diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-01-02 22:51:11 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-01-02 22:51:11 +0000 |
commit | 569d2dda13fbd31e31b1e2efcfbe81d1ac341183 (patch) | |
tree | 73608780ee1d9f70c572b6b65caf88fc4bcad6e5 /sys-power/nut | |
parent | Bump to EAPI 5 (diff) | |
download | historical-569d2dda13fbd31e31b1e2efcfbe81d1ac341183.tar.gz historical-569d2dda13fbd31e31b1e2efcfbe81d1ac341183.tar.bz2 historical-569d2dda13fbd31e31b1e2efcfbe81d1ac341183.zip |
Remove old (bash-completion.eclass cleanup).
Package-Manager: portage-2.2.15/cvs/Linux x86_64
Manifest-Sign-Key: 0xEFB4464E!
Diffstat (limited to 'sys-power/nut')
-rw-r--r-- | sys-power/nut/ChangeLog | 8 | ||||
-rw-r--r-- | sys-power/nut/Manifest | 36 | ||||
-rw-r--r-- | sys-power/nut/nut-2.6.0-r1.ebuild | 219 | ||||
-rw-r--r-- | sys-power/nut/nut-2.6.3.ebuild | 222 |
4 files changed, 23 insertions, 462 deletions
diff --git a/sys-power/nut/ChangeLog b/sys-power/nut/ChangeLog index 1d7cd5351a15..e474b49b6509 100644 --- a/sys-power/nut/ChangeLog +++ b/sys-power/nut/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-power/nut -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.118 2014/11/02 10:18:14 swift Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.119 2015/01/02 22:51:10 mgorny Exp $ + + 02 Jan 2015; Michał Górny <mgorny@gentoo.org> -nut-2.6.0-r1.ebuild, + -nut-2.6.3.ebuild: + Remove old (bash-completion.eclass cleanup). 02 Nov 2014; Sven Vermeulen <swift@gentoo.org> nut-2.6.5-r1.ebuild, nut-2.7.2-r2.ebuild: diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest index 3db1796fef45..7a78956cfe28 100644 --- a/sys-power/nut/Manifest +++ b/sys-power/nut/Manifest @@ -17,30 +17,28 @@ AUX nut-2.7.1-fix-scanning.patch 2311 SHA256 32f375e084b8250bbcbbd402517ca720040 AUX nut-2.7.1-snmpusb-order.patch 1417 SHA256 1f2d8bd74cebf61c711130046a8fee99d29fa482d2b1a235816c6348a16acd49 SHA512 df3701821bc4ef45a5089e4d4439c3367fb23cefce7d06168bd422a8c32a1b373ae9fb3456bd5f90a51a672edf9ce29254a08c2045efe210a11b82399793ec19 WHIRLPOOL 0904f346748d16336c57cfb10741aba6a2d0e76f988925e7479dc8ae742b5fcfdd09dce531e5d5743009593fd61e9810b505b24db2f15d8d37c0bebd912abfdb AUX nut-2.7.2/nut-2.7.2-no-libdummy.patch 535 SHA256 3412955defbf36999896e348569e994e4b89915fcf056e6448348b1209996647 SHA512 a402a70a4cfc922d31203560627ace87f82795aef072d333cb1bfb91a6b67fbc10769e5d68a8d2741ca512b81b5754e9141b68dcb197dbe558ed5556e2de37a1 WHIRLPOOL 0a5c0012c00a5db475e28405b1f60613bc487c1d7df89e5b6505f74cc4534a7bf5b500e5288be6a4bf10543150400d6f10568affe4df4663b508596cf20d4e07 AUX nut.powerfail.initd 1420 SHA256 502001e6fea35c18c6869b492aea7ea584cde7cfd983fe78ca9ca454ac591b26 SHA512 5921fbff0fa079a362c1de67783724382f5bcbd0c75aa179641c77bc31c44562d61e027f05218022151ed0aa446b813cd2fb110baa945cbfa732d741ea9fc6d4 WHIRLPOOL ce099ce9cf57e710958446e1fb9aa6c6c837d2eb964928549e78bac2e7ef36f77d16baab33cc85afeba18b801fa4cdf9b2199391b449f3ff1ed8e730e5887510 -DIST nut-2.6.0.tar.gz 1703273 SHA256 febaa230b6b5f0ad27d780851047527d36c8c7a34e557b3832d6d55174d7a0d5 SHA512 82bf03ef01931c819d550babed48806a45411083bc0a79d1e10e44ec798fb07032e0f8eda409ddd591faf4506955bd98656afc97bc6d357276de70d0ce15b775 WHIRLPOOL e7da975a7c1eafd3b9d7e90456b6924ded74e9576746a91e3692b9e58dfa24878567596fa850776a88542673a35098cc0b22ca79ec3c597dccf03ee2119c001c -DIST nut-2.6.3.tar.gz 1952115 SHA256 34913b729d2032faaf6f31e800a400bcd874f1f4daacae6fe0d388bd235b633a SHA512 8f6fede6c8891e9f4844cb8a82301334a33b31e832effec7f83ed756e1b263e103503f5a0178a588b29df5bc2a6eb6b6d42121cfb839c16f082ffd901788fdd4 WHIRLPOOL a6e96419b604027aa89b67d2a13dd4690185dc16cc378383a66e7a1ee72b6d35f192d39b0f71c20e284ccd449729410667c485bf0e8f5b8dc9a1e0eb83c22e78 DIST nut-2.6.5.tar.gz 2038832 SHA256 618df71cf1ca6e3700d1d3c282773a2dec85f9f20324c0d3234c824e97feb93f SHA512 f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7dcb83deeb78f6885007ad188a7a3a19e411eba87e03eb2246310bd7a5a5bb6fa3ad2bebd49d8 WHIRLPOOL 2b189f77d18d26303c60f2c084796075b0a50b8aa9cbefc3ba9a83f037450ffc3ecdb289367435e784a6bbe8569f768a97130a1ccdf123e53f13e0cf8813fb9a DIST nut-2.7.2.tar.gz 2223307 SHA256 4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d SHA512 7d6b44e8f2d03544d9825274f4f3039911e335eb51620ded3dc08d51aeb096281c2ec848831815c54eecd4f2a25bdb1e6e5f479422e5291f03c3055da7ba52e6 WHIRLPOOL 6e7c45ef09fc2e86f0b79787043a9bf9954b5ef57fb16f9d453734680ff947abd8fb6665c5da4dac09850f5ab6a414039aa067803ecdeb2efd8537b8909f1ff9 -EBUILD nut-2.6.0-r1.ebuild 6891 SHA256 26fdabf0a40cbd7e203d82f29aabbd9545ee169fb549660c542115dd57a4e01e SHA512 f69b29e6b087546ecc87631a016c7694bbd930e30506b117967557fa08e4684d47574d850e9b1a2a5175f12e693f430e4551dd977af7780fa6d124ba4c3fb938 WHIRLPOOL 9ac56244017d7aac89bebf33ed157b8c0a186892b9bc26f71c894ffd31db0fb0518e8bb2fa9f7fcb0f00d56f2c74b77f8566e957e61e09a608e6624cce1352ca -EBUILD nut-2.6.3.ebuild 7001 SHA256 7219a213582b71dd10620131089569ee8a68ff2ed1767176f6b2a003a4e91aa4 SHA512 0236a4e9e40cadeeb487050dedc8fd2f30b282029f8e9a753241587f6b8c4735d8977069a5ed6a35a58e4e56097661480a5b967f19fdfe9e508fe2251917908f WHIRLPOOL 062d769275c3baa0b965ae4a86e27daf398c838f52a74650c6fead6ec968245c9da799229262d1186b79e64c539fe16a7d4606b9b7c948e23f411602c1cbaf02 EBUILD nut-2.6.5-r1.ebuild 7340 SHA256 1133b4ff18018cbfef124370e4f529b4abd24fc43ebb58b7f261431573a9805d SHA512 f4c2d281d6e45d702814690ac003d795838b0069811c04fa2e5b31e81c4b0c36173be94656c2c311b588dd599816f59a7822858b495c8f4a8f99477d14beb327 WHIRLPOOL aa1ad9b1792b09ded0c449db1e6cd74d1bc33838a19effe45caac179c49b8ff024c3de9808704db46d642476878bac9dadd4db383e1384d2611eba2f8b768a2b EBUILD nut-2.7.2-r2.ebuild 9456 SHA256 c9f02f4fa3153a2f7c3f076481a9b12284118238ee75520d708c4ab546278bcb SHA512 8efabdb568aaaad44836117c75bab6003d1a01880757c44df511a2e6d66253a69ecdceaa2994bd94f3623add41b7f33b1b8fe73445c95d02f9c3b171ab3f7f07 WHIRLPOOL f77c7a68bf316af5ec2070f81d79b5481e5d1824f5c9122bb4874a63c4f38f73cc81b52b0c0394a3187b45c19ef263c851a010981dd88d7389e42a49b510f066 -MISC ChangeLog 24723 SHA256 a77af72ea51bf36842f8e427cf32d86e3c0176b56650eef5095ef71a1e9ef288 SHA512 18308b4319da778dd8b7b952e36f462fdce2a6935e3e6f7a7de4c94f3f1b302494007f8d9bd01716de80a6e7d6f53fc8ab1aadbc24914fb2525260b22efaf90f WHIRLPOOL c6ad62bc947fdc8c6610011ce68626ffadbf6cad8a89c4aec9e0aa0893d06ced8f8f507efd796f34a45e5927dced8038fe6f4286a73157f641d48a6d61c91e8a +MISC ChangeLog 24865 SHA256 849f81c077afebae42c09e56c7b34cf9bbdd25fd6483c234c2d24ae9cebe4dec SHA512 39cf958b542c47a35aa44a988ea72b49abda6dcaeae43c8fcfc25a7719a2d7f02e6ad8ac90e6312a5de8565a2f7e38ace552fb72e39397ded46fc82e6dfd6142 WHIRLPOOL ff6ed27721775e1ed82ce367c3d27b2e1981eabebb144ef672fc985cbd9da133fc48df9f55233781a40f123b43d0ab4ca3423ba03f9e815f7b5433e10c8f8212 MISC metadata.xml 5153 SHA256 09e74956c734541540fdd23ca7cecc7915b3919e249d716a7728c97f4040275f SHA512 9eafcc590b4624cf96a88f192b1f4bf58cc99719d0859bb2b911d162379502d40aa31c1d24c2f7dd3862f9b7ec9878a7e41de5dee99542b47fa2c28c981b91d6 WHIRLPOOL 9238c15e4163ebe94234e2d78030af7b37f09ebeb9729610c8d8fc1adab4e0af05de45f7e498d041ee1052937fd517cdbc52144ffee9f0bd582fb8b9078b13ad -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0 +Version: GnuPG v2 -iQIcBAEBCAAGBQJUVgTnAAoJEC7dUkA7aK9HoQQP+gIFn33yg70nVZEB4J1Hgg08 -gj1KwpVb0peTC8b9HPE6THhADA/F2fTZYLPktZqydr1jO0opTZtbOPZqn4DRdtu3 -SPDi80YhaNbG3HBp76uQ61vGvj/sKPj9a2rpaZp91mY8yMvbV1Kpb/Iu6X2AlcYX -3lxBmcsTkb6xU6wMBpJDuPo/ZaRVJR7bqqwzTIzg5PyvGQceMeVo4QbTh5xeqAWB -enCbH6E/1t75O6nUS55yMP6A1I3y2lh2Szou1i5Stx+ewEJEGjSqUp/BPpEgsNEy -oK8ypQPw3ehC+jhhPbgDhj9Z5Kz5ZydW4nAgukw+DVt249962dJ0JhBB9J1FZ8AM -X5PDK93uvWf+K1849cHajw7IKiBK1JzuUv/BEoN6czCm3I1QnjUzd1VYfAgdFL/5 -axOoZjcSNhZVPaWzngoOfG5mTc3KytbadoYe3M5ocbTmMX3ZMxMTzE+erh41xgha -7Rsd2TLQT1xaDMDjVCIOO0vcoamx2373tHvJoRN5mzS2YfMm0DaNV1lvUlrbHPsw -DLnRLnypD9Q4WICHQC8OaSiR1RRl6FhyTS0OeyAUMmaYpck9M21n2xOlb/YdXZDG -ry7QkdWbVLEnv9lozl97zWd+KGPS71Kl7H9KYwCMYrFjoPoPzRyv4ugzFI6atTVy -cTQYAWKV2/2zNxBYBvmt -=hJPk +iQJ8BAEBCABmBQJUpyDfXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC +MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOjoUP/iCkfyePr5gnbI7l/0Ju/k+Y +Rph7y6aKz26AWcXHttNr7TQf+ADqMO5nOOD4I2Vum84fzCt21oGUGVgdwlYAfbbi ++c4ep164/J57kJwRZWqIv2SxAV+RoFre5rA3AsZq+0wbLI0a+rs4LdkfSLN5uQlu +UkM5XTTI0l8kqyBu1SvpMKdAYQgxH/rDlWVWVjiyR/HBlKClI3WBSPq/U/+jz3bo +3UtFVoInZFCdUPkuHbqfEMNi/4Z+7kWhnL6KIbvDE3P200Q+D8gdx3tVKGwDk/Tr +LntCuL73fnKJ2K8prepaJt1CInTrYwsHn9aTRIEgxfUGOWfCPf+8+CuyOvm+3WXo +MvxLG4rUEYUK9OozD0rqTedpgujEtv7XYMLqRZrqOAHn/rbUzBLIeEclm15VGZt+ +EbPJFibOZtxOVSSk05swC9njkeS+wn59pr+wM+VwWbxftuTx+xchh49tMXTfSzoq +ItVV1tIQGSlQYDk6BsColjcNVJQ1UXwAy4fq+Bhr/81ifIGIkshKWI3La44MbJgQ +v8zCXsaj1FFLqooNMVnvqyT5T9MFhNYs44aiTTCVmS4AckYEU5gzXSA3xL0x9Iht +C5m5fVGW4ytfnr/iPSsUq9j31hWgPod0L7FDnBrg4R7vqVFg1KcqcQqFkEaolsF6 +Z1oM8lq5qMHNQ0FluDPR +=C+U1 -----END PGP SIGNATURE----- diff --git a/sys-power/nut/nut-2.6.0-r1.ebuild b/sys-power/nut/nut-2.6.0-r1.ebuild deleted file mode 100644 index 75c2ea16544f..000000000000 --- a/sys-power/nut/nut-2.6.0-r1.ebuild +++ /dev/null @@ -1,219 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.6.0-r1.ebuild,v 1.9 2014/06/29 08:28:45 swift Exp $ - -EAPI=2 -inherit autotools bash-completion eutils fixheadtails multilib user - -MY_P=${P/_/-} - -DESCRIPTION="Network-UPS Tools" -HOMEPAGE="http://www.networkupstools.org/" -# Nut mirrors are presently broken -SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz - http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd" -IUSE="cgi snmp usb selinux ssl tcpd xml" - -RDEPEND="cgi? ( >=media-libs/gd-2[png] ) - snmp? ( net-analyzer/net-snmp ) - usb? ( virtual/libusb:0 ) - selinux? ( sec-policy/selinux-nut ) - ssl? ( >=dev-libs/openssl-1 ) - tcpd? ( sys-apps/tcp-wrappers ) - xml? ( >=net-libs/neon-0.25.0 ) - virtual/udev" -DEPEND="$RDEPEND - >=sys-apps/sed-4 - virtual/pkgconfig" - -S=${WORKDIR}/${MY_P} - -# public files should be 644 root:root -NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" -# private files should be 640 root:nut - readable by nut, writeable by root, -NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" -# public files should be 644 root:root, only installed if USE=cgi -NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" - -pkg_setup() { - enewgroup nut 84 - enewuser nut 84 -1 /var/lib/nut nut,uucp - # As of udev-104, NUT must be in uucp and NOT in tty. - gpasswd -d nut tty 2>/dev/null - gpasswd -a nut uucp 2>/dev/null - # in some cases on old systems it wasn't in the nut group either! - gpasswd -a nut nut 2>/dev/null - warningmsg ewarn -} - -src_prepare() { - ht_fix_file configure.in - - epatch "${FILESDIR}"/${PN}-2.4.1-no-libdummy.patch - epatch "${FILESDIR}"/${PN}-2.4.3-lowspeed-buffer-size.patch - - sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ - -i configure.in || die - - sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ - -i scripts/udev/Makefile.am || die - - rm -f ltmain.sh m4/lt* m4/libtool.m4 - - sed -i \ - -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ - lib/libupsclient{.pc,-config}.in || die #361685 - - eautoreconf -} - -src_configure() { - local myconf - - if [ -n "${NUT_DRIVERS}" ]; then - myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}" - fi - - use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" - - # TODO: USE flag for sys-power/powerman - econf \ - --sysconfdir=/etc/nut \ - --datarootdir=/usr/share/nut \ - --datadir=/usr/share/nut \ - --disable-static \ - --with-dev \ - $(use_with usb) \ - --without-hal \ - $(use_with snmp) \ - $(use_with xml neon) \ - --without-powerman \ - $(use_with ssl) \ - $(use_with tcpd wrap) \ - $(use_with cgi) \ - --with-statepath=/var/lib/nut \ - --with-drvpath=/$(get_libdir)/nut \ - --with-htmlpath=/usr/share/nut/html \ - --with-user=nut \ - --with-group=nut \ - --with-logfacility=LOG_DAEMON \ - ${myconf} -} - -src_install() { - emake DESTDIR="${D}" install || die - - find "${D}" -name '*.la' -exec rm -f {} + - - dodir /sbin - dosym /$(get_libdir)/nut/upsdrvctl /sbin/upsdrvctl - # This needs to exist for the scripts - dosym /$(get_libdir)/nut/upsdrvctl /usr/sbin/upsdrvctl - - if use cgi; then - elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." - elog "copy them to your web server's ScriptPath to activate (this is a" - elog "change from the old location)." - elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." - fi - - # this must be done after all of the install phases - for i in "${D}"/etc/nut/*.sample ; do - mv "${i}" "${i/.sample/}" - done - - dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die - - newdoc lib/README README.lib || die - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die - - docinto cables - dodoc docs/cables/* || die - - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsd upsd || die - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon || die - newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die - - keepdir /var/lib/nut - - einfo "Setting up permissions on files and directories" - fperms 0700 /var/lib/nut - fowners nut:nut /var/lib/nut - - # Do not remove eval here, because the variables contain shell expansions. - eval fperms 0640 ${NUT_PRIVATE_FILES} - eval fowners root:nut ${NUT_PRIVATE_FILES} - - # Do not remove eval here, because the variables contain shell expansions. - eval fperms 0644 ${NUT_PUBLIC_FILES} - eval fowners root:root ${NUT_PUBLIC_FILES} - - # Do not remove eval here, because the variables contain shell expansions. - if use cgi; then - eval fperms 0644 ${NUT_CGI_FILES} - eval fowners root:root ${NUT_CGI_FILES} - fi - - # this is installed for 2.4 and fbsd guys - if ! has_version virtual/udev; then - einfo "Installing non-udev hotplug support" - insinto /etc/hotplug/usb - insopts -m 755 - doins scripts/hotplug/nut-usbups.hotplug - fi - - dobashcompletion "${S}"/scripts/misc/nut.bash_completion -} - -pkg_postinst() { - # this is to ensure that everybody that installed old versions still has - # correct permissions - - chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null - chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null - eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null - eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - if use cgi; then - eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null - eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null - fi - - warningmsg elog -} - -warningmsg() { - msgfunc="$1" - [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" - ${msgfunc} "Please note that NUT now runs under the 'nut' user." - ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." - ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" - ${msgfunc} "hotplug rules that are installed, and alter them suitably." - ${msgfunc} '' - ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." - ${msgfunc} '' - ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." - ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" - ${msgfunc} "have a service per UPS:" - ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" - ${msgfunc} '' - ${msgfunc} 'If you want apcupsd to power off your UPS when it' - ${msgfunc} 'shuts down your system in a power failure, you must' - ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' - ${msgfunc} '' - ${msgfunc} 'rc-update add nut.powerfail shutdown' - ${msgfunc} '' - -} diff --git a/sys-power/nut/nut-2.6.3.ebuild b/sys-power/nut/nut-2.6.3.ebuild deleted file mode 100644 index 66772a362c21..000000000000 --- a/sys-power/nut/nut-2.6.3.ebuild +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.6.3.ebuild,v 1.9 2014/06/29 08:28:45 swift Exp $ - -EAPI=2 -inherit autotools bash-completion eutils fixheadtails multilib user - -MY_P=${P/_/-} - -DESCRIPTION="Network-UPS Tools" -HOMEPAGE="http://www.networkupstools.org/" -# Nut mirrors are presently broken -SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz - http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd" -IUSE="avahi cgi snmp usb selinux ssl tcpd xml" - -RDEPEND="avahi? ( net-dns/avahi ) - cgi? ( >=media-libs/gd-2[png] ) - snmp? ( net-analyzer/net-snmp ) - usb? ( virtual/libusb:0 ) - selinux? ( sec-policy/selinux-nut ) - ssl? ( >=dev-libs/openssl-1 ) - tcpd? ( sys-apps/tcp-wrappers ) - xml? ( >=net-libs/neon-0.25.0 ) - virtual/udev" -DEPEND="$RDEPEND - >=sys-apps/sed-4 - virtual/pkgconfig" - -S=${WORKDIR}/${MY_P} - -# public files should be 644 root:root -NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" -# private files should be 640 root:nut - readable by nut, writeable by root, -NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" -# public files should be 644 root:root, only installed if USE=cgi -NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" - -pkg_setup() { - enewgroup nut 84 - enewuser nut 84 -1 /var/lib/nut nut,uucp - # As of udev-104, NUT must be in uucp and NOT in tty. - gpasswd -d nut tty 2>/dev/null - gpasswd -a nut uucp 2>/dev/null - # in some cases on old systems it wasn't in the nut group either! - gpasswd -a nut nut 2>/dev/null - warningmsg ewarn -} - -src_prepare() { - ht_fix_file configure.in - - epatch "${FILESDIR}"/${PN}-2.4.1-no-libdummy.patch - epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch - epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch - - sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ - -i configure.in || die - - sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ - -i scripts/udev/Makefile.am || die - - rm -f ltmain.sh m4/lt* m4/libtool.m4 - - sed -i \ - -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ - lib/libupsclient{.pc,-config}.in || die #361685 - - eautoreconf -} - -src_configure() { - local myconf - - if [ -n "${NUT_DRIVERS}" ]; then - myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}" - fi - - use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" - - # TODO: USE flag for sys-power/powerman - econf \ - --sysconfdir=/etc/nut \ - --datarootdir=/usr/share/nut \ - --datadir=/usr/share/nut \ - --disable-static \ - --with-dev \ - $(use_with usb) \ - --without-hal \ - $(use_with snmp) \ - $(use_with xml neon) \ - --without-powerman \ - $(use_with ssl) \ - $(use_with tcpd wrap) \ - $(use_with cgi) \ - $(use_with avahi) \ - --with-statepath=/var/lib/nut \ - --with-drvpath=/$(get_libdir)/nut \ - --with-htmlpath=/usr/share/nut/html \ - --with-user=nut \ - --with-group=nut \ - --with-logfacility=LOG_DAEMON \ - ${myconf} -} - -src_install() { - emake DESTDIR="${D}" install || die - - find "${D}" -name '*.la' -exec rm -f {} + - - dodir /sbin - dosym /$(get_libdir)/nut/upsdrvctl /sbin/upsdrvctl - # This needs to exist for the scripts - dosym /$(get_libdir)/nut/upsdrvctl /usr/sbin/upsdrvctl - - if use cgi; then - elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." - elog "copy them to your web server's ScriptPath to activate (this is a" - elog "change from the old location)." - elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." - fi - - # this must be done after all of the install phases - for i in "${D}"/etc/nut/*.sample ; do - mv "${i}" "${i/.sample/}" - done - - dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die - - newdoc lib/README README.lib || die - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die - - docinto cables - dodoc docs/cables/* || die - - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsd upsd || die - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon || die - newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die - - keepdir /var/lib/nut - - einfo "Setting up permissions on files and directories" - fperms 0700 /var/lib/nut - fowners nut:nut /var/lib/nut - - # Do not remove eval here, because the variables contain shell expansions. - eval fperms 0640 ${NUT_PRIVATE_FILES} - eval fowners root:nut ${NUT_PRIVATE_FILES} - - # Do not remove eval here, because the variables contain shell expansions. - eval fperms 0644 ${NUT_PUBLIC_FILES} - eval fowners root:root ${NUT_PUBLIC_FILES} - - # Do not remove eval here, because the variables contain shell expansions. - if use cgi; then - eval fperms 0644 ${NUT_CGI_FILES} - eval fowners root:root ${NUT_CGI_FILES} - fi - - # this is installed for 2.4 and fbsd guys - if ! has_version virtual/udev; then - einfo "Installing non-udev hotplug support" - insinto /etc/hotplug/usb - insopts -m 755 - doins scripts/hotplug/nut-usbups.hotplug - fi - - dobashcompletion "${S}"/scripts/misc/nut.bash_completion -} - -pkg_postinst() { - # this is to ensure that everybody that installed old versions still has - # correct permissions - - chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null - chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null - eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null - eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - if use cgi; then - eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null - eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null - fi - - warningmsg elog -} - -warningmsg() { - msgfunc="$1" - [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" - ${msgfunc} "Please note that NUT now runs under the 'nut' user." - ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." - ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" - ${msgfunc} "hotplug rules that are installed, and alter them suitably." - ${msgfunc} '' - ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." - ${msgfunc} '' - ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." - ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" - ${msgfunc} "have a service per UPS:" - ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" - ${msgfunc} '' - ${msgfunc} 'If you want apcupsd to power off your UPS when it' - ${msgfunc} 'shuts down your system in a power failure, you must' - ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' - ${msgfunc} '' - ${msgfunc} 'rc-update add nut.powerfail shutdown' - ${msgfunc} '' - -} |