summarylogtreecommitdiffstats
path: root/_create_package.sh
blob: 76edda3d07ca41fd04b64e3130cb8435637e59f7 (plain)
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
#!/bin/bash -e
# requires asp to be installed

# needed for removing old contents but sparing our files
shopt -s extglob

# cleanup
if [ -d cups ]; then
    rm -r cups
fi
if ls !("_create_package.sh"|"_patch.sed") >/dev/null 2>/dev/null; then
    rm -r !("_create_package.sh"|"_patch.sed")
fi

# get upstream cups package
asp export cups
mv cups/* ./
rmdir cups

# apply our patches
sed -Ef _patch.sed -i PKGBUILD

# seemingly the AUR does not like subdirectories
rm -r -- */

# update metadata
makepkg --printsrcinfo > .SRCINFO