File: build-archlinux.sh

package info (click to toggle)
infnoise 0.3.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 27,304 kB
  • sloc: ansic: 2,177; sh: 251; python: 146; makefile: 65
file content (39 lines) | stat: -rwxr-xr-x 772 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh -ex

VERSION=`git --no-pager describe --tags --always | cut -d'-' -f1`
PKGREL=`git --no-pager describe --tags --always | cut -d'-' -f2`

GITREPO=`git config --get remote.origin.url`

if [ $VERSION == $PKGREL ]; then # this is a release
	PKGREL=0
fi

SIGNPACKAGE=1

while test $# -gt 0
do
    case "$1" in
        --notsigned) SIGNPACKAGE=0
            ;;
    esac
    shift
done

# x86_64
mkdir -p x86_64
cd x86_64

cp ../PKGBUILD.arch PKGBUILD
cp ../INSTALL.arch INSTALL

sed -i "s|.*source.*=.*(.*).*|source=('git+$GITREPO')|g" PKGBUILD
#echo "pkgver=$VERSION.$PKGREL" >> PKGBUILD
echo "pkgrel=1" >> PKGBUILD
echo "arch=('x86_64')" >> PKGBUILD

makepkg -f

if [ $SIGNPACKAGE -eq 1 ]; then
	PKGEXT='.pkg.tar.xz' makepkg --packagelist  | xargs -L1 gpg --sign
fi