diff options
| author | kj-sh604 | 2025-06-27 19:54:59 -0400 |
|---|---|---|
| committer | kj-sh604 | 2025-06-27 19:54:59 -0400 |
| commit | 1181c546c664caec34636ad6fefc26f6ab519fc3 (patch) | |
| tree | 255559e4fc9e35797318d5bad5142d961cd6503c /bsd-coreutils-port-git | |
| parent | fa600abf1a9c0a10e978281d958999a2dbbd4892 (diff) | |
refactor: rename directory
Diffstat (limited to 'bsd-coreutils-port-git')
| -rw-r--r-- | bsd-coreutils-port-git/.SRCINFO | 15 | ||||
| -rw-r--r-- | bsd-coreutils-port-git/.gitignore | 4 | ||||
| -rw-r--r-- | bsd-coreutils-port-git/PKGBUILD | 55 |
3 files changed, 74 insertions, 0 deletions
diff --git a/bsd-coreutils-port-git/.SRCINFO b/bsd-coreutils-port-git/.SRCINFO new file mode 100644 index 0000000..4aecc3f --- /dev/null +++ b/bsd-coreutils-port-git/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = bsd-coreutils-port-git + pkgdesc = A collection of basic BSD utilities ported to GNU/Linux + pkgver = r545.d2b28e0 + pkgrel = 1 + url = https://github.com/DiegoMagdaleno/BSDCoreUtils + arch = x86_64 + license = BSD + makedepends = cmake + makedepends = git + depends = glibc + depends = openssl + source = git+https://github.com/DiegoMagdaleno/BSDCoreUtils.git + sha256sums = SKIP + +pkgname = bsd-coreutils-port-git diff --git a/bsd-coreutils-port-git/.gitignore b/bsd-coreutils-port-git/.gitignore new file mode 100644 index 0000000..deed96a --- /dev/null +++ b/bsd-coreutils-port-git/.gitignore @@ -0,0 +1,4 @@ +pkg/ +src/ +BSDCoreUtils/ +*.tar* diff --git a/bsd-coreutils-port-git/PKGBUILD b/bsd-coreutils-port-git/PKGBUILD new file mode 100644 index 0000000..fdaa258 --- /dev/null +++ b/bsd-coreutils-port-git/PKGBUILD @@ -0,0 +1,55 @@ +pkgname=bsd-coreutils-port-git +_pkgname=BSDCoreUtils +pkgver=r545.d2b28e0 +pkgrel=1 +pkgdesc="A collection of basic BSD utilities ported to GNU/Linux" +arch=('x86_64') +url="https://github.com/DiegoMagdaleno/BSDCoreUtils" +license=('BSD') +depends=('glibc' 'openssl') +makedepends=('cmake' 'git') +source=("git+https://github.com/DiegoMagdaleno/BSDCoreUtils.git") +sha256sums=('SKIP') + +pkgver() { + cd "$_pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$_pkgname" + cmake -B build -S . \ + -DCMAKE_INSTALL_PREFIX=/opt/bsd-coreutils \ + -DCMAKE_BUILD_TYPE=Release + make -C build +} + +package() { + cd "$_pkgname" + make -C build DESTDIR="$pkgdir" install + install -d "$pkgdir/usr/bin" + + if [ -d "$pkgdir/opt/bsd-coreutils/bin" ]; then + for bin in $(ls "$pkgdir/opt/bsd-coreutils/bin/"); do + ln -s "/opt/bsd-coreutils/bin/$bin" "$pkgdir/usr/bin/bsd_$bin" + done + fi + + # just move manpages to the correct spot and add a prefix, for now + # i'll deal with this some other time + install -d "$pkgdir/usr/share/man" + for mandir in "$pkgdir"/man*; do + if [ -d "$mandir" ]; then + for manfile in "$mandir"/*; do + if [ -f "$manfile" ]; then + section=$(basename "$mandir") + newname="bsd_$(basename "$manfile")" + install -Dm644 "$manfile" "$pkgdir/usr/share/man/$section/$newname" + fi + done + rm -rf "$mandir" + fi + done +} + +# vim: set ts=2 sw=2 et: |
