David Runge pushed to branch main at Arch Linux / Packaging / Packages / openbsd-netcat
Commits: 9ff4df2b by David Runge at 2024-10-24T22:03:55+02:00 Switch to correct SPDX license identifier Signed-off-by: David Runge <[email protected]> - - - - - 55d6a3cd by David Runge at 2024-10-24T22:14:54+02:00 Apply patches in prepare() instead of build() Signed-off-by: David Runge <[email protected]> - - - - - 83a4a794 by David Runge at 2024-10-24T22:17:12+02:00 Symlink nc to nc.openbsd because tools like cloud-init expect it Debian installs nc as nc.openbsd, which is expected to exist by tools like cloud-init. Relates-to: https://gitlab.archlinux.org/archlinux/packaging/packages/cloud-init/-/issues/3 Signed-off-by: David Runge <[email protected]> - - - - - 73c93b95 by David Runge at 2024-10-24T22:22:43+02:00 Simplify directory setup Signed-off-by: David Runge <[email protected]> - - - - - 2f1eaf6d by David Runge at 2024-10-24T22:24:35+02:00 Consolidate dependencies Signed-off-by: David Runge <[email protected]> - - - - - 6fe9c4d3 by David Runge at 2024-10-24T22:26:23+02:00 upgpkg: 1.226_1-3 Rebuild to consolidate dependencies, update license setup and symlink nc to nc.openbsd. - - - - - 2 changed files: - .SRCINFO - PKGBUILD Changes: ===================================== .SRCINFO ===================================== @@ -1,12 +1,12 @@ pkgbase = openbsd-netcat pkgdesc = TCP/IP swiss army knife. OpenBSD variant. pkgver = 1.226_1 - pkgrel = 2 + pkgrel = 3 url = https://salsa.debian.org/debian/netcat-openbsd arch = x86_64 - license = BSD - makedepends = gcc - makedepends = make + license = BSD-2-Clause + license = BSD-3-Clause + depends = glibc depends = libbsd provides = netcat conflicts = gnu-netcat ===================================== PKGBUILD ===================================== @@ -3,35 +3,50 @@ pkgname="openbsd-netcat" pkgver=1.226_1 -pkgrel=2 +_ver="${pkgver/_/-}" +pkgrel=3 pkgdesc="TCP/IP swiss army knife. OpenBSD variant." arch=('x86_64') url="https://salsa.debian.org/debian/netcat-openbsd" -license=('BSD') -depends=('libbsd') -makedepends=('gcc' 'make') +license=( + 'BSD-2-Clause' + 'BSD-3-Clause' +) +depends=( + 'glibc' + 'libbsd' +) provides=('netcat') conflicts=('gnu-netcat') source=("https://salsa.debian.org/debian/netcat-openbsd/-/archive/debian/${pkgver/_/-}/netcat-openbsd-debian-${pkgver/_/-}.tar.gz") sha256sums=('cd1c102e5954436184c3f7f3e7b649eed05ef38aa9592b55577ca28878b268d2') b2sums=('a46a357352a9f86fe1f9f1e9d2d17cb6bb16f9c829ffa996711858fd21aed8d54df5834b55850aa2f67ccbcac6c6336379e7553118c8277c4da97278870e87ed') +_dir=netcat-openbsd-debian-$_ver + +prepare() { + # extract dedicated licenses + sed -n '40,59p' $_dir/debian/copyright > BSD-2-Clause.txt + sed -n '62,83p' $_dir/debian/copyright > BSD-3-Clause.txt + + cd $_dir + while read patch; do + printf "Applying %s...\n" "$patch" + patch -Np1 -i debian/patches/$patch + done < debian/patches/series +} build() { - cd netcat-openbsd-debian-${pkgver/_/-} - for i in `cat debian/patches/series`; do - echo "** patch $i" 1>&2 - cat "debian/patches/$i" - done | patch -p1 + cd $_dir make \ CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgver/_/-}\\\"\" -I/usr/include/libbsd" \ LDFLAGS="$LDFLAGS -lbsd" } package() { - cd netcat-openbsd-debian-${pkgver/_/-} + cd $_dir install -Dm0755 nc "$pkgdir"/usr/bin/nc ln -s nc "$pkgdir"/usr/bin/netcat + ln -s nc "$pkgdir"/usr/bin/nc.openbsd install -Dm0644 nc.1 "$pkgdir"/usr/share/man/man1/nc.1 - install -dm0755 "$pkgdir"/usr/share/licenses/$pkgname/ - head -n28 netcat.c | tail -n+2 >"$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -vDm 644 ../*.txt -t "$pkgdir"/usr/share/licenses/$pkgname/ } View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/openbsd-netcat/-/compare/b5856371dad0849224e3c8d3a7c7900b60b4e0bf...6fe9c4d3e8fd71c591488e83d0fc7574cd821bdb -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/openbsd-netcat/-/compare/b5856371dad0849224e3c8d3a7c7900b60b4e0bf...6fe9c4d3e8fd71c591488e83d0fc7574cd821bdb You're receiving this email because of your account on gitlab.archlinux.org.
