Skip to content

Commit

Permalink
update bittwist
Browse files Browse the repository at this point in the history
  • Loading branch information
taotieren committed Nov 15, 2024
1 parent d1c6299 commit 40103b4
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
47 changes: 47 additions & 0 deletions aur-repo/bittwist/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Maintainer: Daniel Wilhelm <shieldwed [at] outlook [dot] com>
# Maintainer: taotieren <admin@taotieren.com>

pkgname=bittwist
pkgver=r5.06f5334
pkgrel=1
pkgdesc='Libpcap-based Ethernet packet generator'
url='http://bittwist.sourceforge.net'
license=('GPL-2.0-or-later')
arch=('i686' 'x86_64' 'aarch64')
depends=(
'glibc'
'libpcap>=1.2.1')
makedepends=(git
pkgconf)
# Downloading tar.gz fails, use git instead, then tar.gz when it stabilizes.
# source=("https://sourceforge.net/projects/${pkgname}/files/Linux/Bit-Twist%20${pkgver}/${pkgname}-linux-${pkgver}.tar.gz")
source=("${pkgname}::git+https://git.code.sf.net/p/bittwist/git")
# https://prdownloads.sourceforge.net/bittwist/bittwist-linux-4.7.tar.gz

sha256sums=('SKIP')

pkgver() {
cd "${srcdir}/${pkgname}"
(
set -o pipefail
git describe --long --tag --abbrev=7 2>/dev/null | sed 's/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
)
}

prepare() {
git -C "${srcdir}/${pkgname}" clean -dfx
}

build() {
cd "${srcdir}/${pkgname}"
sed -i -e 's|/usr/local/|/usr/|g' \
-e 's|-Wl,-Bstatic -lpcap -Wl,-Bdynamic|-lpcap|g' Makefile
make
}

package() {
cd "${srcdir}/${pkgname}"
make prefix="${pkgdir}/usr" install
}
# vim:set ts=2 sw=2 et:
12 changes: 12 additions & 0 deletions aur-repo/bittwist/lilac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
maintainers:
- github: taotieren
build_prefix: extra-x86_64
pre_build: vcs_update
post_build_script: |
git_pkgbuild_commit()
update_aur_repo()
update_on:
- source: git
git: https://git.code.sf.net/p/bittwist/git
branch: master
use_commit: true

0 comments on commit 40103b4

Please sign in to comment.