# $Id$ PNAME="networkmanager" PVER="0.8.9997" PBUILD="r1" PCATEGORIE="net-misc" DESCRIPTION="Network configuration and management in an easy way." HOMEPAGE="http://projects.gnome.org/NetworkManager/" # hardcoded ppp version PPP_PVER=2.4.5 DEPEND=">= sys-apps/dbus-1.4 >= dev-libs/glib2-2.28 >= dev-libs/dbus-glib-0.92 >= dev-libs/libnl-1.1 >= dev-libs/nss-3.12.10 >= sys-fs/e2fsprogs-1.41.14 >= sys-fs/udev-171 >= sys-apps/polkit-0.101 >= net-misc/modemmanager-0.4 >= net-wlan/wireless-tools-30_pre9 >= net-wlan/wpa-supplicant-0.7.3 >= net-wlan/bluez-4.95 >= net-dns/avahi-0.6.30 >= net-misc/dhcpcd-5.2.12 == net-dialup/ppp-${PPP_PVER} >= sys-apps/iproute2-2.6.38 >= net-misc/iptables-1.4.11" SDEPEND=">= dev-util/pkgconfig-0.25 >= dev-util/intltool-0.41" SRCFILE="NetworkManager-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/NetworkManager-${PVER}" sminclude gnome2 mtools SRC_URI=( gnome://NetworkManager/${PVER%.*}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/nm-system-settings.conf mirror://${PNAME}/${PNAME}-0.8.5.91-magellan.patch mirror://${PNAME}/${PNAME}-0.8.5.91-plugdev.patch mirror://${PNAME}/${PNAME}-0.8.1-hostname.patch ) UP2DATE="updatecmd_gnome NetworkManager" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # support our distro mpatch ${PNAME}-0.8.5.91-magellan.patch || die # allow plugdev group to do things mpatch ${PNAME}-0.8.5.91-plugdev.patch || die # do not change the hostname on magellan mpatch ${PNAME}-0.8.1-hostname.patch || die # regen configure files autoreconf --verbose --install --force || die # fix broken po makefile # config.status: error: po/Makefile.in.in was not created by intltoolize. autopoint --force || die intltoolize --force || die } src_compile() { cd ${SRCDIR} mconfigure \ --libexecdir=/usr/$(mlibdir)/${PNAME} \ --localstatedir=/var \ --enable-more-warnings=yes \ --disable-gtk-doc \ --with-distro=magellan \ --with-dbus-sys-dir=/etc/dbus-1/system.d \ --with-udev-dir=/lib/udev \ --with-pppd-plugin-dir=/usr/$(mlibdir)/pppd/${PPP_PVER} \ --with-iptables=/sbin/iptables \ --with-dhcpcd=yes \ --with-dhclient=no \ --with-crypto=nss \ --enable-wimax=no \ --enable-polkit=yes \ --without-docs \ --without-resolvconf \ || die mmake || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die # needed directories mkeepdir /etc/NetworkManager/dispatcher.d || die mkeepdir /var/run/NetworkManager || die # add keyfile plugin support mkeepdir /etc/NetworkManager/system-connections || die minstallfile -s nm-system-settings.conf /etc/NetworkManager/ || die minstalldocs AUTHORS ChangeLog NEWS README TODO || die } postinstall() { # reload dbus to load the nm config mreloadservice dbus /usr/bin/dbus-daemon mreloadunit dbus.service /usr/bin/dbus-daemon echo echo "To save system-wide settings as a user, that user needs to have the" echo "right policykit privileges. You can add them by running:" echo 'polkit-auth --grant org.freedesktop.network-manager-settings.system.modify --user "USERNAME"' echo } postremove() { # reload dbus to unload the nm config mreloadservice dbus /usr/bin/dbus-daemon mreloadunit dbus /usr/bin/dbus-daemon }