summaryrefslogtreecommitdiff
path: root/source/n/NetworkManager/NetworkManager.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/NetworkManager/NetworkManager.SlackBuild')
-rwxr-xr-xsource/n/NetworkManager/NetworkManager.SlackBuild61
1 files changed, 34 insertions, 27 deletions
diff --git a/source/n/NetworkManager/NetworkManager.SlackBuild b/source/n/NetworkManager/NetworkManager.SlackBuild
index 41e0d18d..d152c07c 100755
--- a/source/n/NetworkManager/NetworkManager.SlackBuild
+++ b/source/n/NetworkManager/NetworkManager.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
-# Copyright 2010, 2011 Robby Workman, Northport, Alabama, USA
-# Copyright 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2010, 2011, 2014, 2016 Robby Workman, Northport, Alabama, USA
+# Copyright 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,13 +25,13 @@
PKGNAM=NetworkManager
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -46,8 +46,8 @@ TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -81,9 +81,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Find the version off pppd installed or else assume we are on -current:
-PPPD=$( basename $(find /usr/lib${LIBDIRSUFFIX}/pppd -type d -maxdepth 1 -mindepth 1) )
-[ -z "$PPPD" ] && PPPD=2.4.5
+# Find the version number for pppd, used to specify the plugin directory:
+PPPD=$(echo /usr/lib${LIBDIRSUFFIX}/pppd/?.?.? | rev | cut -f 1 -d / | rev)
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -94,6 +93,7 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
+ --with-udev-dir=/lib/udev \
--with-pppd-plugin-dir=/usr/lib${LIBDIRSUFFIX}/pppd/$PPPD \
--with-crypto=nss \
--enable-more-warnings=no \
@@ -101,24 +101,26 @@ CXXFLAGS="$SLKCFLAGS" \
--with-dhcpcd=/sbin/dhcpcd \
--with-dhclient=yes \
--with-modem-manager-1=yes \
+ --with-nmtui=yes \
+ --disable-vala \
+ --with-session-tracking=consolekit \
+ --with-suspend-resume=consolekit \
+ --with-hostname-persist=slackware \
--build=$TARGET || exit 1
make $NUMJOBS || exit 1
make install DESTDIR=$PKG || exit 1
-# For some reason NetworkManager-0.9.8.0 does not install these:
-( cd man
- mkdir -p $PKG/usr/man/man1
- cp -a *.1 $PKG/usr/man/man1
- mkdir -p $PKG/usr/man/man5
- cp -a *.5 $PKG/usr/man/man5
- mkdir -p $PKG/usr/man/man8
- cp -a *.8 $PKG/usr/man/man8
-)
-
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# Fix hardlinked manpages:
+( cd $PKG/usr/man/man1
+ ln -sf nmtui.1 nmtui-connect.1
+ ln -sf nmtui.1 nmtui-edit.1
+ ln -sf nmtui.1 nmtui-hostname.1
+)
+
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
@@ -133,19 +135,24 @@ mkdir -p $PKG/etc/rc.d
cat $CWD/rc.networkmanager > $PKG/etc/rc.d/rc.networkmanager.new
chmod 0644 $PKG/etc/rc.d/rc.networkmanager.new
-# Add a 'starter' NetworkManager.conf file
-# This sets the hostname (during postinstall) to match the system's name
-# and defines dhcpcd as the dhcp client to use
-mkdir -p $PKG/etc/NetworkManager
-cat $CWD/NetworkManager.conf.new > \
- $PKG/etc/NetworkManager/NetworkManager.conf.new
+# Add the pm-utils hook back in
+# xfce4-power-manager needs to be built *without* NM support
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d/
+cat $CWD/55NetworkManager > $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d/55NetworkManager
+chmod 0755 $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d/55NetworkManager
+
+# Add default (plain) config file to enable keyfile plugin
+cat $CWD/NetworkManager.conf > $PKG/etc/NetworkManager/NetworkManager.conf.new
+
+# Set dhcp client to "dhcpcd" and rc-manager to "file" by default
+mkdir -p $PKG/etc/NetworkManager/conf.d
+cat $CWD/conf.d/00-dhcp-client.conf > $PKG/etc/NetworkManager/conf.d/00-dhcp-client.conf.new
+cat $CWD/conf.d/00-rc-manager.conf > $PKG/etc/NetworkManager/conf.d/00-rc-manager.conf.new
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS CONTRIBUTING COPYING ChangeLog INSTALL NEWS README TODO \
$PKG/usr/doc/$PKGNAM-$VERSION
-# In case someone needs this still:
-cp $CWD/55NetworkManager $PKG/usr/doc/$PKGNAM-$VERSION/
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control: