archrelease: copy trunk to community-any
[ArchLinux/community.git] / pax / trunk / PKGBUILD
blob54b04ffd404e7636ce244a754b66b5be03ca5700
1 # Maintainer: Daniel Bermond <dbermond@archlinux.org>
3 pkgname=pax
4 pkgver=20201030
5 pkgrel=2
6 pkgdesc='Portable Archive Interchange - the POSIX standard archive tool for cpio and tar formats'
7 arch=('x86_64')
8 url='https://www.mirbsd.org/pax.htm'
9 license=('BSD')
10 depends=('glibc')
11 source=("https://www.mirbsd.org/MirOS/dist/mir/cpio/paxmirabilis-${pkgver}.cpio.gz")
12 noextract=("paxmirabilis-${pkgver}.cpio.gz")
13 sha256sums=('fe3f99c28ba7a46c4bce0b329da3742908b87fe8fbe17f0db1f99a1bd053d46b')
15 prepare() {
16     mkdir -p "${pkgname}-${pkgver}/build"
17     bsdtar -x -f "paxmirabilis-${pkgver}.cpio.gz" -C "$pkgname-${pkgver}" --strip-components='1'
20 build() {
21     cd "${pkgname}-${pkgver}/build"
22     sh ../Build.sh -r -tpax
23     
24     # license
25     sed -n '5,36p' ../pax.h > LICENSE # create file
26     sed -i '1,32s/^.\{,3\}//' LICENSE # erase C comments
29 package(){
30     # executables
31     install -D -m755 "${pkgname}-${pkgver}/build/pax" -t "${pkgdir}/usr/bin"
32     ln -s pax "${pkgdir}/usr/bin/paxcpio"
33     ln -s pax "${pkgdir}/usr/bin/paxtar"
34     
35     # man pages
36     install -D -m644 "${pkgname}-${pkgver}/build/mans/"*.1 -t "${pkgdir}/usr/share/man/man1"
37     
38     # license
39     install -D -m644 "${pkgname}-${pkgver}/build/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"