summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Pozolotin2016-06-10 00:31:32 +0000
committerAndrei Pozolotin2016-06-10 00:31:32 +0000
commitbec538b51b3719bc9efae2d0e36dbd7a198a3dd3 (patch)
tree86b7c6f5a384a426c9a2eb5b16ded8a385e9dc3b
parente8ca884941cf0ca79e473eee36a138d4a0224d5b (diff)
downloadaur-bec538b51b3719bc9efae2d0e36dbd7a198a3dd3.tar.gz
M PKGBUILD
M mkinitcpio-systemd-tool-aur.launch.sh
-rw-r--r--PKGBUILD24
-rwxr-xr-xmkinitcpio-systemd-tool-aur.launch.sh4
2 files changed, 14 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 94e60cdc2fff..579b608f7ff9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,6 +4,8 @@ pkgdesc='Provisioning tool for systemd in initramfs (systemd-tool)'
pkgname=mkinitcpio-systemd-tool
pkgver=3
pkgrel=1
+url="https://github.com/random-archer/$pkgname"
+source=("git+${url}.git")
depends=(
'mkinitcpio'
'systemd'
@@ -37,14 +39,7 @@ arch=('any')
md5sums=('SKIP')
license=('Apache')
-url="https://github.com/random-archer/$pkgname"
-
-# switch between a release tag and a development branch
-#_fragment=$([[ $pkgver =~ ^[0-9]+$ ]] && printf "#tag=v$pkgver" || printf "#branch=master")
-#source=("git+${url}.git${_fragment}")
-source=("git+${url}.git")
-
-# select version depending on marker file presence:
+# select proper version depending on marker file presence:
# * create .PKGDEV to use latest development version (from master branch)
# * create .PKGREL to use latest release version (named with release tag vNNN)
# * remove all markes and set pkgver=NNN above to use an existing vNNN release tag (the default)
@@ -68,20 +63,27 @@ pkgver() {
fi
}
-####
-
+# 1.
prepare() {
- echo "srcdir $srcdir"
+ local repo=$srcdir/$pkgname # working repo location
+ local version=$(pkgver) # proper version number or string
+ local target=$([[ $version =~ ^[0-9]+$ ]] && printf "v$version" || printf "master")
+ git -C $repo checkout --quiet "$target" # checkout proper version
+ git -C $repo status
+ true
}
+# 2.
build() {
true
}
+# 3.
check() {
true
}
+# 4.
package() {
local hook="systemd-tool"
diff --git a/mkinitcpio-systemd-tool-aur.launch.sh b/mkinitcpio-systemd-tool-aur.launch.sh
index 835ab2d4635a..a44bd846ada8 100755
--- a/mkinitcpio-systemd-tool-aur.launch.sh
+++ b/mkinitcpio-systemd-tool-aur.launch.sh
@@ -33,7 +33,7 @@ do_provision_proper() {
chown -R nobody $location
suno="sudo -u nobody"
fi
- $suno makepkg --cleanbuild --force
+ $suno makepkg --force
}
do_provision_simple() {
@@ -78,8 +78,6 @@ do_version_proper() {
suno="sudo -u $user"
fi
- $suno makepkg --cleanbuild --force
-
$suno makepkg --printsrcinfo > .SRCINFO
}