summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordreieck2022-04-26 15:33:04 +0200
committerdreieck2022-04-26 15:33:04 +0200
commit6a61cc68ffc9005387d9ab91aeb254c880901426 (patch)
tree783f600f023a3aaa2828d26885dcda88f99323ff
parent942314a960764b227492ff178d530c1a0b28f34a (diff)
downloadaur-6a61cc68ffc9005387d9ab91aeb254c880901426.tar.gz
* Changed source from ZIP-file to true git download,
* added `netcfg-wireguard` optional dependency, * `pkgver()` update, * some cleanup of `PKGBUILD`.
-rw-r--r--.SRCINFO36
-rw-r--r--PKGBUILD152
2 files changed, 89 insertions, 99 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 88de964175bd..39606c5a5e31 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,15 @@
pkgbase = netcfg-git
pkgdesc = Network configuration and profile scripts (install only if you really know that you want this instead of netctl). Includes patch to make wifi-menu work, OpenRC and systemd initscripts.
- pkgver = 4.0.rg54f4656
- pkgrel = 2
+ pkgver = 4.0.r563_20130808_54f4656
+ pkgrel = 1
+ epoch = 0
url = https://github.com/GNU-Pony/netcfg/
install = netcfg.install
arch = any
groups = base
license = BSD
makedepends = auto-auto-complete
+ makedepends = git
makedepends = gzip
makedepends = texinfo
makedepends = texman
@@ -18,23 +20,24 @@ pkgbase = netcfg-git
depends = grep
depends = iproute2
depends = sed
- optdepends = bridge-utils: for bridge connections.
- optdepends = dialog: for the menu based profile and wifi selectors.
- optdepends = dhclient: for DHCPv6.
- optdepends = ifenslave: for bond connections.
- optdepends = ifplugd: for automatic wired connections through net-auto-wired.
- optdepends = wireless_tools: for interface renaming through net-rename.
- optdepends = wpa_actiond: for automatic wireless connections through net-auto-wireless.
- optdepends = wpa_supplicant: for wireless networking support.
- provides = netcfg=4.0.rg54f4656
- provides = netcfg-openrc=4.0.rg54f4656
- provides = netcfg-systemd=4.0.rg54f4656
+ optdepends = bridge-utils: For bridge connections.
+ optdepends = dialog: For the menu based profile and wifi selectors.
+ optdepends = dhclient: For alternative DHCP client.
+ optdepends = ifenslave: For bond connections.
+ optdepends = ifplugd: For automatic wired connections through net-auto-wired.
+ optdepends = netcfg-wireguard: For wireguard support.
+ optdepends = wireless_tools: For interface renaming through net-rename.
+ optdepends = wpa_actiond: For automatic wireless connections through net-auto-wireless.
+ optdepends = wpa_supplicant: For wireless networking support.
+ provides = netcfg=4.0.r563_20130808_54f4656
+ provides = netcfg-openrc=4.0.r563_20130808_54f4656
+ provides = netcfg-systemd=4.0.r563_20130808_54f4656
conflicts = netctl
conflicts = netcfg
- replaces = netcfg<=4.0.rg54f4656
+ options = emptydirs
backup = etc/iftab
backup = etc/conf.d/netcfg
- source = netcfg-master.zip::https://github.com/GNU-Pony/netcfg/archive/master.zip
+ source = netcfg::git+https://github.com/GNU-Pony/netcfg.git
source = netcfg.openrc
source = netcfg.conf
source = netcfg.bash-completion_extended
@@ -42,7 +45,7 @@ pkgbase = netcfg-git
source = newer-wpasupplicant.patch
source = Makefile.deduplicate-examples.patch
source = netcfg.install
- sha256sums = 0ac7179314e73596fcd371de402af61291113fec66f2de2f25ed93d98803bfa7
+ sha256sums = SKIP
sha256sums = 4a21fb2a8eed541ff23ef93e8150607074d40f248fa923fcede27102ed2944da
sha256sums = 0525757fb59b9174f2c3bbc9828bb4590f89144f0506cadf13dafa0b76ec3e14
sha256sums = a353438378891f711902f13d4df5e19dfcde756b453bb865c0f6660e3c1bc68f
@@ -52,4 +55,3 @@ pkgbase = netcfg-git
sha256sums = 07c16d4de52acc97abe2633b5a3cf077bac6924159b47474c93d936816846468
pkgname = netcfg-git
-
diff --git a/PKGBUILD b/PKGBUILD
index fd1611b03835..ea5d91b2c436 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,23 +3,20 @@
# Previous maintainer: Jouke Witteveen <j.witteveen@gmail.com>
_pkgname='netcfg'
-pkgname='netcfg-git'
-pkgver=4.0.rg54f4656
-pkgrel=2
+pkgname="${_pkgname}-git"
+epoch=0
+pkgver=4.0.r563_20130808_54f4656
+pkgrel=1
pkgdesc="Network configuration and profile scripts (install only if you really know that you want this instead of netctl). Includes patch to make wifi-menu work, OpenRC and systemd initscripts."
url='https://github.com/GNU-Pony/netcfg/'
-arch=(any)
-license=(BSD)
-
+arch=('any')
+license=('BSD')
install='netcfg.install'
-
backup=(
'etc/iftab'
'etc/conf.d/netcfg'
)
-
groups=("base")
-
depends=(
"bash>=4.0"
'coreutils'
@@ -29,44 +26,36 @@ depends=(
'iproute2'
'sed'
)
-
makedepends=(
"auto-auto-complete" # For generating shell auto-completion.
+ "git" # For downloading the source.
"gzip" # For compressing manpages.
"texinfo" # For generating info manual.
"texman" # For generating manpages.
)
-
optdepends=(
- 'bridge-utils: for bridge connections.'
- 'dialog: for the menu based profile and wifi selectors.'
- 'dhclient: for DHCPv6.'
- 'ifenslave: for bond connections.'
- 'ifplugd: for automatic wired connections through net-auto-wired.'
- 'wireless_tools: for interface renaming through net-rename.'
- 'wpa_actiond: for automatic wireless connections through net-auto-wireless.'
- 'wpa_supplicant: for wireless networking support.'
+ 'bridge-utils: For bridge connections.'
+ 'dialog: For the menu based profile and wifi selectors.'
+ 'dhclient: For alternative DHCP client.'
+ 'ifenslave: For bond connections.'
+ 'ifplugd: For automatic wired connections through net-auto-wired.'
+ 'netcfg-wireguard: For wireguard support.'
+ 'wireless_tools: For interface renaming through net-rename.'
+ 'wpa_actiond: For automatic wireless connections through net-auto-wireless.'
+ 'wpa_supplicant: For wireless networking support.'
)
-
provides=(
"${_pkgname}=${pkgver}"
"${_pkgname}-openrc=${pkgver}"
"${_pkgname}-systemd=${pkgver}"
)
-
-replaces=(
- "${_pkgname}<=${pkgver}"
-)
-
conflicts=(
"netctl"
"${_pkgname}"
)
-
_source_base="https://github.com/GNU-Pony/${_pkgname}"
-
source=(
- "${_pkgname}-master.zip::${_source_base}/archive/master.zip" # NOTE: We download as a .zip-file such that we can have a checksum. We do it here for security, knowing that we don't download a fixed version and that we need to update the sha256sum when a new commit has been done. Although, this project does not seem to update often.
+ "${_pkgname}::git+${_source_base}.git"
"netcfg.openrc"
"netcfg.conf"
"netcfg.bash-completion_extended"
@@ -75,9 +64,8 @@ source=(
"Makefile.deduplicate-examples.patch"
"${install}"
)
-
sha256sums=(
- "0ac7179314e73596fcd371de402af61291113fec66f2de2f25ed93d98803bfa7"
+ "SKIP"
"4a21fb2a8eed541ff23ef93e8150607074d40f248fa923fcede27102ed2944da"
"0525757fb59b9174f2c3bbc9828bb4590f89144f0506cadf13dafa0b76ec3e14"
"a353438378891f711902f13d4df5e19dfcde756b453bb865c0f6660e3c1bc68f"
@@ -86,94 +74,94 @@ sha256sums=(
"1d10981f419c580f7a47150502acccf61139477e3abeae7bfcc3eec384787222"
"07c16d4de52acc97abe2633b5a3cf077bac6924159b47474c93d936816846468"
)
-
-_upk_base="${_pkgname}-master"
+options=(
+ 'emptydirs'
+)
pkgver() {
- _unpackeddir="${srcdir}/${_upk_base}"
- cd "${_unpackeddir}"
-
- _ver="$(cat CHANGELOG | grep -Ei 'version[[:space:]]+[0-9\.]*' | head -n 1 | grep '' | awk '{print $2}')"
-
- _rev="$(git ls-remote --exit-code "${_source_base}.git" "refs/heads/master" | head -c 7)"
-
- if [ -z "${_ver}" ]; then
- echo "$0: Error: Could not determine version." > /dev/stderr
- false
- return 1
+ cd "${srcdir}/${_pkgname}"
+
+ _ver="$(head -n1 CHANGELOG | awk '{print $2}')"
+ _rev="$(git rev-list --count HEAD)"
+ _date="$(git log -n 1 --format=tformat:%ci | awk '{print $1}' | tr -d '-')"
+ _hash="$(git rev-parse --short=7 HEAD)"
+
+ if [ -z ${_ver} ]; then
+ error "Failed to determine build version. Aborting."
+ return 11
+ fi
+ if [ -z ${_rev} ]; then
+ error "Failed to determine commit count. Aborting."
+ return 12
+ fi
+ if [ -z ${_date} ]; then
+ error "Failed to determine latest commit date. Aborting."
+ return 13
fi
-
- if [ -z "${_rev}" ]; then
- echo "$0: Error: Could not determine SVN revision." > /dev/stderr
- false
- return 1
- else
- _rev="g${_rev}"
+ if [ -z ${_hash} ]; then
+ error "Failed to determine git hash. Aborting."
+ return 14
fi
-
- echo "${_ver}.r${_rev}"
+
+ printf "%s" "${_ver}.r${_rev}_${_date}_${_hash}"
}
prepare() {
- _unpackeddir="${srcdir}/${_upk_base}"
- cd "${_unpackeddir}"
-
+ cd "${srcdir}/${_pkgname}"
+
for _patch in "${srcdir}"/*.patch; do
msg "Applying patch '${_patch}' ..."
- patch -p1 < "${_patch}"
+ patch -Np1 < "${_patch}"
done
}
build() {
- _unpackeddir="${srcdir}/${_upk_base}"
- cd "${_unpackeddir}"
-
+ cd "${srcdir}/${_pkgname}"
+
make
}
package() {
- _unpackeddir="${srcdir}/${_upk_base}"
- cd "${_unpackeddir}"
-
+ cd "${srcdir}/${_pkgname}"
+
### Core, manpages, info pages. We don't do 'install-daemon', which would be the sysvinit initscripts, since sysvinit is not really supported.
make DESTDIR="${pkgdir}" install-conf install-lib install-hook install-script install-doc
-
+
### systemd.
make DESTDIR="${pkgdir}" install-systemd
# Compatibility.
- ln -s "${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/net-profiles.service"
-
+ ln -sv "${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/net-profiles.service"
+
### Remove /usr/lib/network/hooks/initscripts, since it would source files which are not available, resulting in error.
rm -f "${pkgdir}/usr/lib/network/hooks/initscripts" || true
-
+
### Install own version of conf.d (overwrite installed by Makefile).
- install -D -m644 "${srcdir}/netcfg.conf" "${pkgdir}/etc/conf.d/netcfg"
-
+ install -v -D -m644 "${srcdir}/netcfg.conf" "${pkgdir}/etc/conf.d/netcfg"
+
### OpenRC initscript.
- install -D -m755 "${srcdir}/netcfg.openrc" "${pkgdir}/etc/init.d/netcfg"
-
+ install -v -D -m755 "${srcdir}/netcfg.openrc" "${pkgdir}/etc/init.d/netcfg"
+
### License.
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
+ install -v -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
### /usr/share/doc/-Documentation.
_docdir="${pkgdir}/usr/share/doc/${_pkgname}"
mkdir -p "${_docdir}"
chmod 755 "${_docdir}"
- install -m 644 AUTHORS CHANGELOG CONTRIBUTING "${_docdir}"
- install -m 644 README "${_docdir}/README.make"
-
+ install -v -m 644 AUTHORS CHANGELOG CONTRIBUTING "${_docdir}"
+ install -v -m 644 README "${_docdir}/README.make"
+
### Shell Completion.
- #install -D -m644 netcfg.bash-completion "$pkgdir/usr/share/bash-completion/completions/netcfg"
- #install -D -m644 netcfg.zsh-completion "$pkgdir/usr/share/zsh/site-functions/_netcfg" # Yes!, the '_' in front is intended.
- install -D -m644 "${srcdir}/netcfg.bash-completion_extended" "$pkgdir/usr/share/bash-completion/completions/netcfg"
- install -D -m644 "${srcdir}/netcfg.zsh-completion_extended" "$pkgdir/usr/share/zsh/site-functions/_netcfg" # Yes!, the '_' in front is intended.
+ #install -v -D -m644 netcfg.bash-completion "$pkgdir/usr/share/bash-completion/completions/netcfg"
+ #install -v -D -m644 netcfg.zsh-completion "$pkgdir/usr/share/zsh/site-functions/_netcfg" # Yes!, the '_' in front is intended.
+ install -v -D -m644 "${srcdir}/netcfg.bash-completion_extended" "$pkgdir/usr/share/bash-completion/completions/netcfg"
+ install -v -D -m644 "${srcdir}/netcfg.zsh-completion_extended" "$pkgdir/usr/share/zsh/site-functions/_netcfg" # Yes!, the '_' in front is intended.
}
# _list_examples() {
# ### Helper-function help to manually generate the 'EXAMPLES'-variable in the Makefile.
-# _unpackeddir="${srcdir}/${_upk_base}"
-# cd "${_unpackeddir}"
-#
+# cd "${srcdir}/${_pkgname}"
+#
# ls -1 extra/examples/* | sort -n | while read line; do echo " ${line} \\"; done
# }