Add packaging scripts for Meson

It probably doesn't belong here but I don't feel like creating another
repository for this either yet.
This commit is contained in:
2017-04-30 10:45:23 +02:00
parent 9afcb337ad
commit e25a880883
4 changed files with 69 additions and 0 deletions

22
meson/packaging/make-pacman.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh -e
cd "$MESON_BUILD_ROOT"
. "$MESON_SUBDIR/meta"
wd="`pwd`/`mktemp -d pacman.XXXXXX`"
trap "rm -rf '$wd'" INT QUIT TERM EXIT
target="$name-$version-$arch.tar.xz"
fakeroot sh -e <<-EOF
DESTDIR="$wd" ninja install
cat > "$wd/.PKGINFO" <<END
pkgname = $name
pkgver = $version-1
pkgdesc = $summary
url = $url
builddate = \`date -u +%s\`
packager = $author
size = \`du -sb --apparent-size | cut -f1\`
arch = $arch
END
cd "$wd" && tar cJf "../$target" .PKGINFO *
echo Written $target
EOF