Last active
January 10, 2020 18:50
-
-
Save raspi/dd620005f77f5e8e41e818b4db916350 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Pekka Järvinen | |
# FreeBSD's pkg git (source) version | |
# Intended use is for building FreeBSD binary packages on Arch Linux with: | |
# % pkg create --format txz --root-dir $(PWD) --manifest manifest.sh | |
pkgname=freebsd-pkg-git | |
pkgver=1 | |
pkgrel=1 | |
pkgdesc="FreeBSD pkg from source (for building FreeBSD packages on Linux)" | |
url="https://github.com/freebsd/pkg" | |
license=('BSD') | |
arch=('any') | |
md5sums=('SKIP') | |
source=("gitsource::git+https://github.com/freebsd/pkg.git") | |
depends=('sudo') | |
makedepends=('autoconf' 'automake' 'binutils' 'fakeroot' 'gcc' 'make' 'git') | |
# FreeBSD devs use subversion so tags/branches are not reliable from git | |
# Use date and hash instead | |
pkgver() { | |
cd "gitsource" | |
printf "r%s.%s" "$(git --no-pager log -1 --format="%ad" --date=format:'%Y%m%d%H%M%S')" "$(git rev-parse --short HEAD)" | |
} | |
build() { | |
cd "gitsource" | |
./autogen.sh | |
./configure --prefix=/usr | |
make | |
} | |
package() { | |
cd "gitsource" | |
pushd src && sudo make etcdir=/etc sbindir=/usr/bin install && popd | |
pushd docs && sudo make install && popd | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment