diff options
author | nroi | 2016-12-18 22:24:39 +0100 |
---|---|---|
committer | nroi | 2016-12-18 22:51:52 +0100 |
commit | 8217b98dfa8c75e74db6a2deb5d896fcc53b32da (patch) | |
tree | 000b216dd1b72aff44cd00eb9aa5f275954274e6 | |
download | aur-8217b98dfa8c75e74db6a2deb5d896fcc53b32da.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | cpcache.install | 10 | ||||
-rw-r--r-- | cpcache.service | 12 | ||||
-rw-r--r-- | sysuser.conf | 2 |
5 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bdeb8993220e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = cpcache-git + pkgdesc = central pacman cache + pkgver = r61.4a3239c + pkgrel = 1 + url = https://github.com/nroi/cpcache + install = cpcache.install + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + arch = aarch64 + license = MIT + makedepends = erlang-nox + makedepends = elixir + depends = inotify-tools + backup = etc/cpcache.yaml + source = git+https://github.com/nroi/cpcache.git + source = sysuser.conf + source = cpcache.install + source = cpcache.service + sha256sums = SKIP + sha256sums = 0098e749b19617c0f7d619d47a3bc3015bab62e9ad0916087502daff672fb309 + sha256sums = 159eb7ffd4fc7b44aa15c122aeddf8d433297352def6f0bbfc6a15df25fd8dcb + sha256sums = 4dbfd2b7934438fdde9b182b5e455f04176865063c8943be06bdfdf82ce38529 + +pkgname = cpcache-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9d3dfb1f5977 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: nroi <nroi@mailbox.org> +pkgname=cpcache-git +pkgver=r61.4a3239c +pkgrel=1 +pkgdesc="central pacman cache" +arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') +url='https://github.com/nroi/cpcache' +license=('MIT') +makedepends=('erlang-nox' 'elixir') +depends=('inotify-tools') +install="${pkgname%-git}.install" +backup=('etc/cpcache.yaml') +source=('git+https://github.com/nroi/cpcache.git' + 'sysuser.conf' + 'cpcache.install' + 'cpcache.service' +) +sha256sums=('SKIP' + '0098e749b19617c0f7d619d47a3bc3015bab62e9ad0916087502daff672fb309' + '159eb7ffd4fc7b44aa15c122aeddf8d433297352def6f0bbfc6a15df25fd8dcb' + '4dbfd2b7934438fdde9b182b5e455f04176865063c8943be06bdfdf82ce38529' +) + +pkgver() { + cd "${srcdir}/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +package() { + cd "${srcdir}/${pkgname%-git}" + /usr/bin/mix deps.get + /usr/bin/mix release.init + MIX_ENV=prod mix release --env=prod + mkdir -p "${pkgdir}/usr/share/" + mkdir -p "${pkgdir}/var/lib/${pkgname%-git}" + ln -s "/var/lib/${pkgname%-git}" "${srcdir}/${pkgname%-git}/rel/${pkgname%-git}/var" + cp -r rel/cpcache "${pkgdir}/usr/share/" + install -Dm644 "${srcdir}/cpcache.service" "${pkgdir}/usr/lib/systemd/system/cpcache.service" + install -Dm644 "${srcdir}/sysuser.conf" "${pkgdir}/usr/lib/sysusers.d/cpcache.conf" + install -Dm644 "${srcdir}/cpcache/conf/cpcache.yaml" "${pkgdir}/etc/cpcache.yaml" +} diff --git a/cpcache.install b/cpcache.install new file mode 100644 index 000000000000..7d2d64654a04 --- /dev/null +++ b/cpcache.install @@ -0,0 +1,10 @@ +post_install() { + systemd-sysusers cpcache.conf + chown cpcache:cpcache "/var/lib/cpcache" + mkdir -p /var/cache/cpcache/{x86,arm}/{core,extra,multilib,testing,community}/os/{i686,x86_64}/downloads + chown -R cpcache:cpcache "/var/cache/cpcache" +} + +post_upgrade() { + systemd-sysusers cpcache.conf +} diff --git a/cpcache.service b/cpcache.service new file mode 100644 index 000000000000..d6524169ecfd --- /dev/null +++ b/cpcache.service @@ -0,0 +1,12 @@ +[Unit] +Description=central pacman cache +After=network.target + +[Service] +Type=simple +User=cpcache +Group=cpcache +ExecStart=/usr/share/cpcache/bin/cpcache foreground + +[Install] +WantedBy=multi-user.target diff --git a/sysuser.conf b/sysuser.conf new file mode 100644 index 000000000000..036a7bd3bb49 --- /dev/null +++ b/sysuser.conf @@ -0,0 +1,2 @@ +g cpcache - - - +u cpcache - - /var/lib/cpcache |