diff options
author | tehcneko | 2023-09-06 12:21:46 +0800 |
---|---|---|
committer | tehcneko | 2023-09-06 12:22:54 +0800 |
commit | 36880ffbe3d38499549db8dc5918382d08193ba0 (patch) | |
tree | 737872a7b46c1a83826ebb7816bb60df8fc7f17f | |
parent | 05a0c579c9e572bfff1376903b569c1c8fb69547 (diff) | |
download | aur-cuttlefish-user-git.tar.gz |
fixup pkgbuild
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | cuttlefish-user.install (renamed from install.sh) | 5 |
3 files changed, 52 insertions, 13 deletions
@@ -1,17 +1,25 @@ pkgbase = cuttlefish-user-git pkgdesc = Cuttlefish Android Virtual Device companion package contains set of tools and binaries required to boot up and manage Cuttlefish Android Virtual Device that are used in all deployments. - pkgver = 0.9.25 + pkgver = r846.20230905.2bc891285 pkgrel = 1 + epoch = 1 url = https://github.com/google/android-cuttlefish - install = install.sh + install = cuttlefish-user.install arch = any license = Apache makedepends = git makedepends = go depends = cuttlefish-base-git depends = openssl - depends = start-stop-daemon + provides = cuttlefish-user + conflicts = cuttlefish-user source = cuttlefish-user::git+https://github.com/google/android-cuttlefish.git + source = 0001-Fixup-init.d-service-to-be-used-in-usr-bin-for.patch + source = cuttlefish-operator.service + source = cuttlefish-user.install sha256sums = SKIP + sha256sums = c833d37fc97d0a26be71cd068bf7788d1e1f038dbca74f307b7e944f745fec41 + sha256sums = 6e5e9bf246c45031aea13256fd7b36df797f031ea8952a65ca2f3c4d8a149877 + sha256sums = 9317ba70f2948d9117bd75d9040b75a5c2b7834f7e3eb682d8a7ada91c7e7e18 pkgname = cuttlefish-user-git @@ -1,6 +1,7 @@ # Maintainer: Jacob McSwain <jacob@mcswain.dev> pkgname=cuttlefish-user-git -pkgver=0.9.25 +epoch=1 +pkgver=r846.20230905.2bc891285 pkgrel=1 pkgdesc="Cuttlefish Android Virtual Device companion package contains set of tools and binaries required to boot up and manage Cuttlefish Android Virtual Device that are used in all deployments." arch=(any) @@ -10,14 +11,47 @@ makedepends=("git" "go") depends=( "cuttlefish-base-git" "openssl" - "start-stop-daemon" ) -source=("${pkgname%-git}::git+https://github.com/google/android-cuttlefish.git") -sha256sums=('SKIP') -install="install.sh" +provides=( + "${pkgname%-git}" +) +conflicts=( + "${pkgname%-git}" +) +source=( + "${pkgname%-git}::git+https://github.com/google/android-cuttlefish.git" + "0001-Fixup-init.d-service-to-be-used-in-usr-bin-for.patch" + "cuttlefish-operator.service" + "cuttlefish-user.install" +) +sha256sums=( + 'SKIP' + 'c833d37fc97d0a26be71cd068bf7788d1e1f038dbca74f307b7e944f745fec41' + '6e5e9bf246c45031aea13256fd7b36df797f031ea8952a65ca2f3c4d8a149877' + '9317ba70f2948d9117bd75d9040b75a5c2b7834f7e3eb682d8a7ada91c7e7e18' +) +install="cuttlefish-user.install" prepare() { - patch "$srcdir/${pkgname%-git}"/frontend/debian/cuttlefish-user.cuttlefish-operator.init < ../0001-Fixup-init.d-service-to-be-used-in-usr-bin-for.patch + cd "$srcdir/${pkgname%-git}" + + patch frontend/debian/cuttlefish-user.cuttlefish-operator.init < "${srcdir}"/0001-Fixup-init.d-service-to-be-used-in-usr-bin-for.patch + git log > git.log +} + +pkgver() { + cd "$srcdir/${pkgname%-git}" + + _rev="$(git rev-list --count HEAD)" + _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")" + _hash="$(git rev-parse --short HEAD)" + + if [ -z "${_rev}" ]; then + error "Could not determine git commit count." + return 1 + else + printf '%s' "r${_rev}.${_date}.${_hash}" + fi } package() { diff --git a/install.sh b/cuttlefish-user.install index 42cf58ac6947..4ca35a16884b 100644 --- a/install.sh +++ b/cuttlefish-user.install @@ -7,11 +7,8 @@ post_install() { then # The cvdnetwork group is created by cuttlefish-base useradd --system --shell /usr/bin/nologin --home-dir /var/empty \ - --no-create-home --badnames --gid cvdnetwork _cutf-operator + --no-create-home --gid cvdnetwork _cutf-operator fi - - sudo systemctl daemon-reload - sudo systemctl enable --now cuttlefish-operator } # vim: ft=sh:ts=4:sw=4:et:nowrap |