summaryrefslogtreecommitdiff
path: root/pcr/netifrc
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2015-10-22 22:06:16 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2015-10-22 22:06:16 -0500
commit5cf792932c03423e8806f16b097cb021d19278cb (patch)
treed4218ccb49cd70c4f0592620560d5592e61e03ec /pcr/netifrc
parent077d6e888d40ce391185b3d6b64d670aa534ecdc (diff)
downloadabslibre-5cf792932c03423e8806f16b097cb021d19278cb.tar.gz
abslibre-5cf792932c03423e8806f16b097cb021d19278cb.tar.bz2
abslibre-5cf792932c03423e8806f16b097cb021d19278cb.zip
netifrc-0.3.1-6: updating version
Diffstat (limited to 'pcr/netifrc')
-rw-r--r--pcr/netifrc/LICENSE23
-rw-r--r--pcr/netifrc/PKGBUILD66
-rw-r--r--pcr/netifrc/netifrc.install9
3 files changed, 98 insertions, 0 deletions
diff --git a/pcr/netifrc/LICENSE b/pcr/netifrc/LICENSE
new file mode 100644
index 000000000..a995d5485
--- /dev/null
+++ b/pcr/netifrc/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) <YEAR>, <OWNER>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/pcr/netifrc/PKGBUILD b/pcr/netifrc/PKGBUILD
new file mode 100644
index 000000000..47269daa5
--- /dev/null
+++ b/pcr/netifrc/PKGBUILD
@@ -0,0 +1,66 @@
+# Maintainer (Manjaro): artoo <artoo@manjaro.org>
+# Contributor (Manjaro): williamh <williamh@gentoo.org>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_src_uri="https://github.com"
+
+_net_uri="${_src_uri}/gentoo/netifrc/archive"
+_func_uri="${_src_uri}/gentoo/gentoo-functions/archive"
+
+_func_ver=0.10
+
+pkgname=netifrc
+pkgver=0.3.1
+pkgrel=6
+pkgdesc="Gentoo Network Interface Management Scripts"
+arch=('i686' 'x86_64' 'armv7h')
+url="http://www.gentoo.org/proj/en/base/openrc/"
+license=('BSD2')
+groups=('openrc-base')
+depends=('udev-openrc')
+install=${pkgname}.install
+backup=('etc/conf.d/net')
+source=("${pkgname}-${pkgver}.tar.gz::${_net_uri}/${pkgver}.tar.gz"
+ "gentoo-functions-${_func_ver}.tar.gz::${_func_uri}/${_func_ver}.tar.gz"
+ 'LICENSE')
+sha256sums=('8ae41223cdc735eee8303e93959b31b6aeae6f1a08661ef5baa6373dd86419c7'
+ '709c8b22f404001a512e47a7a4d3192070b3e150fb9d0f943de09736d665b0db'
+ '28875cc6cb52e93657b96cf1bf0cc3b91891cdcbbc3196007c8cd93c6e22078f')
+
+_net_args=(SYSCONFDIR=/etc)
+_net_args+=(BRANDING="Parabola")
+_id="parabola"
+_net_args+=(PREFIX=/usr)
+_net_args+=(SBINDIR=/usr/bin)
+_net_args+=(LIBEXECDIR=/usr/lib/${pkgname})
+
+_func_args+=(ROOTPREFIX=/usr)
+_func_args+=(ROOTSBINDIR=/usr/bin)
+_func_args+=(ROOTLIBEXECDIR=/usr/lib/$_id)
+
+build(){
+ # make netifrc
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make "${_net_args[@]}"
+ cd ${srcdir}/gentoo-functions-${_func_ver}
+ make "${_func_args[@]}"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" "${_net_args[@]}" install
+ install -Dm 644 "${srcdir}/${pkgname}-${pkgver}/doc/net.example" "${pkgdir}/etc/conf.d/net"
+
+ install -d "${pkgdir}/etc/runlevels//boot"
+ sed -e 's|#!/usr/bin/runscript|#!/usr/bin/openrc-run|' \
+ -i "${pkgdir}/etc/init.d/net.lo"
+ ln -sf "/etc/init.d/net.lo" "${pkgdir}/etc/runlevels/boot/net.lo"
+
+ cd ${srcdir}/gentoo-functions-${_func_ver}
+ make DESTDIR="${pkgdir}" "${_func_args[@]}" install
+
+ sed -e "s|/lib/gentoo/functions.sh|/usr/lib/$_id/functions.sh|g" \
+ -i "${pkgdir}/usr/lib/${pkgname}/sh/functions.sh"
+
+ install -Dm644 ${srcdir}/LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/pcr/netifrc/netifrc.install b/pcr/netifrc/netifrc.install
new file mode 100644
index 000000000..fa8554bc3
--- /dev/null
+++ b/pcr/netifrc/netifrc.install
@@ -0,0 +1,9 @@
+post_install() {
+ echo " ==> Set up your network interface before you reboot if using netifrc."
+ local _url="https://wiki.gentoo.org/wiki/Handbook:X86/Full/Networking"
+ echo " ==> Visit ${_url}"
+}
+
+post_upgrade() {
+ post_install "$1"
+}