summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authornroi2017-01-01 19:26:39 +0100
committernroi2017-01-01 19:26:39 +0100
commitfffb91ceb21d07eefd90cce1a5307d47606a92df (patch)
treea78b639cbf0f3ca6baaffc854ca4743c377f4b75
parentcd9dfc74f135115a61b21d5ca190b509fa2edb0d (diff)
downloadaur-fffb91ceb21d07eefd90cce1a5307d47606a92df.tar.gz
Update
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD9
-rw-r--r--cpcache.install2
-rwxr-xr-xcreate_db.sh4
4 files changed, 10 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dedab9910b9..efc35e76def 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = cpcache-git
pkgdesc = central pacman cache
- pkgver = r95.974c568
+ pkgver = r96.770827f
pkgrel = 1
url = https://github.com/nroi/cpcache
install = cpcache.install
@@ -20,9 +20,9 @@ pkgbase = cpcache-git
source = create_db.sh
sha256sums = SKIP
sha256sums = 0098e749b19617c0f7d619d47a3bc3015bab62e9ad0916087502daff672fb309
- sha256sums = effdcc6de465d342f4aba039c853d48e501cf0e55ed4f896cf638ba3499584f6
+ sha256sums = 5091070b67c4ebd784d5bca25e6b16340d3265324012ddbf7f367502b0307ac3
sha256sums = 0523a85ce955f9a221340a2bcd8b3f2543dc817469e36623db06630bea925918
- sha256sums = 42c01be8766d2b48f142a7b848d5708035b80143af8f0bb02e69a3bc7fff3825
+ sha256sums = 3bbb19f2f0702cc90c4eaa9cf351656fc74969f955a6f31d574495aa0d8b310e
pkgname = cpcache-git
diff --git a/PKGBUILD b/PKGBUILD
index 4e29373d82e..e7229bab1b0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: nroi <nroi@mailbox.org>
pkgname=cpcache-git
-pkgver=r95.974c568
+pkgver=r96.770827f
pkgrel=1
pkgdesc="central pacman cache"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
@@ -18,9 +18,9 @@ source=('git+https://github.com/nroi/cpcache.git'
)
sha256sums=('SKIP'
'0098e749b19617c0f7d619d47a3bc3015bab62e9ad0916087502daff672fb309'
- 'effdcc6de465d342f4aba039c853d48e501cf0e55ed4f896cf638ba3499584f6'
+ '5091070b67c4ebd784d5bca25e6b16340d3265324012ddbf7f367502b0307ac3'
'0523a85ce955f9a221340a2bcd8b3f2543dc817469e36623db06630bea925918'
- '42c01be8766d2b48f142a7b848d5708035b80143af8f0bb02e69a3bc7fff3825'
+ '3bbb19f2f0702cc90c4eaa9cf351656fc74969f955a6f31d574495aa0d8b310e'
)
pkgver() {
@@ -29,8 +29,6 @@ pkgver() {
}
package() {
- mkdir -p "${pkgdir}/var/cache/cpcache/mnesia"
- ./create_db.sh "${pkgdir}"
cd "${srcdir}/${pkgname%-git}"
/usr/bin/mix local.hex --force
/usr/bin/mix local.rebar --force
@@ -44,4 +42,5 @@ package() {
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"
+ install -Dm755 "${srcdir}/create_db.sh" "${pkgdir}/usr/share/${pkgname%-git}/create_db.sh"
}
diff --git a/cpcache.install b/cpcache.install
index 53fa21fb578..0fec6e3473d 100644
--- a/cpcache.install
+++ b/cpcache.install
@@ -4,6 +4,8 @@ post_install() {
mkdir -p /var/cache/cpcache/mnesia
mkdir -p /var/cache/cpcache/x86/{core,extra,multilib,testing,community}/os/{i686,x86_64}
mkdir -p /var/cache/cpcache/arm/{aarch64,arm,armv6h,armv7h}/{alarm,aur,community,extra,core}
+ mkdir -p /var/cache/cpcache/mnesia
+ su -s /bin/bash cpcache -c /usr/share/cpcache/create_db.sh
chown -R cpcache:cpcache "/var/cache/cpcache"
}
diff --git a/create_db.sh b/create_db.sh
index 863f58f6456..d3efb27b1b1 100755
--- a/create_db.sh
+++ b/create_db.sh
@@ -1,7 +1,5 @@
#!/bin/sh
-PREFIX="$1"
-
CMD=$(cat <<EOF
:ok = :mnesia.create_schema([node])
:ok = :mnesia.start()
@@ -9,4 +7,4 @@ CMD=$(cat <<EOF
disc_copies: [node]])
EOF
)
-ELIXIR_ERL_OPTIONS="-sname cpcache -mnesia dir '$PREFIX/var/cache/cpcache/mnesia'" /usr/bin/elixir -e "$CMD"
+ELIXIR_ERL_OPTIONS="-sname cpcache -mnesia dir '/var/cache/cpcache/mnesia'" /usr/bin/elixir -e "$CMD"