aboutsummaryrefslogtreecommitdiff
path: root/meson/packaging/make-pacman.sh
blob: 5c7fc9e80778b297ab3351a3d14b470c928c628f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 | cut -f1\`
	arch = $arch
	END
	cd "$wd" && tar cJf "../$target" .PKGINFO *
	echo Written $target
EOF