summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorveecue2018-06-02 23:33:43 +0200
committerveecue2018-06-02 23:33:43 +0200
commitb7629d4a7c6f0509b79a958c62b713f6b19906e0 (patch)
tree0765ba671c63aeae91817f2480cbf188932765b3
parentb29a249776f19028a3a6b32bcb5bd36765b43897 (diff)
downloadaur-b7629d4a7c6f0509b79a958c62b713f6b19906e0.tar.gz
changed file structure and removed unneded user
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD33
-rw-r--r--pacmon-mirrorlist.hook9
-rw-r--r--pacmon.install1
-rw-r--r--pacmon.service12
5 files changed, 28 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b221e433040..25525a4bbe6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,22 @@
pkgbase = pacmon-git
- pkgdesc = An automated LAN mirror for pacman
- pkgver = 20171021
+ pkgdesc = A zero-configuration, fast and simple pacman LAN-mirror as a replacement for pacserve
+ pkgver = 20180602
pkgrel = 1
url = https://github.com/veecue/pacmon
install = pacmon.install
- arch = any
+ arch = x86_64
+ arch = i686
+ arch = armv6
+ arch = armv7
license = GPL
makedepends = git
makedepends = go
+ provides = pacmon
+ conflicts = pacmon
options = !strip
options = !emptydirs
- source = pacmon.service
- source = pacmon-mirrorlist.hook
- sha256sums = fb0cdc6bf8a79c518ded1a5c9cc44e2b26f3ea3adee8947c4746d5996c3b75a2
- sha256sums = 82f0a263cc0ebc08e43043d8dec5118afb56f5bbaef64a2021dc0b43f6671c5a
+ source = git+https://github.com/veecue/pacmon
+ sha256sums = SKIP
pkgname = pacmon-git
diff --git a/PKGBUILD b/PKGBUILD
index f2a3e01240b..45164cf3f97 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,37 @@
# Maintainer: veecue <veecue@ventos.tk>
-pkgname=pacmon-git
-pkgver=20171022
+_pkgname=pacmon
+pkgname=$_pkgname-git
+pkgver=20180602
pkgrel=1
-pkgdesc="An automated LAN mirror for pacman"
-arch=('any')
+pkgdesc="A zero-configuration, fast and simple pacman LAN-mirror as a replacement for pacserve"
+arch=('x86_64' 'i686' 'armv6' 'armv7')
url="https://github.com/veecue/pacmon"
license=('GPL')
makedepends=('git' 'go')
options=('!strip' '!emptydirs')
-source=('pacmon.service' 'pacmon-mirrorlist.hook')
-sha256sums=('fb0cdc6bf8a79c518ded1a5c9cc44e2b26f3ea3adee8947c4746d5996c3b75a2' '82f0a263cc0ebc08e43043d8dec5118afb56f5bbaef64a2021dc0b43f6671c5a')
+_gopkg="github.com/veecue/$_pkgname"
+source=("git+https://$_gopkg")
+sha256sums=('SKIP')
+conflicts=("$_pkgname")
+provides=("$_pkgname")
install=pacmon.install
-_gourl=github.com/veecue/pacmon
build() {
- GOPATH="$srcdir" go get -fix -v -x $_gourl
+ mkdir -p "$srcdir/src/$_gopkg"
+ cp -r "$srcdir/$_pkgname/"* "$srcdir/src/$_gopkg"
+ GOPATH="$srcdir" go install -ldflags='-s -w' $_gopkg
}
check() {
- GOPATH="$GOPATH:$srcdir" go test -v -x $_gourl
+ GOPATH="$srcdir" go test $_gopkg
}
package() {
- mkdir -p "$pkgdir/usr/bin"
- install -p -m755 "$srcdir/bin/"* "$pkgdir/usr/bin"
- mkdir -p "$pkgdir/usr/lib/systemd/system"
- install -p -m644 "$srcdir/pacmon.service" "$pkgdir/usr/lib/systemd/system"
- mkdir -p "$pkgdir/usr/share/libalpm/hooks"
- install -p -m644 "$srcdir/pacmon-mirrorlist.hook" "$pkgdir/usr/share/libalpm/hooks"
+ install -pDm755 "$srcdir/bin/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
+ install -pDm644 "$srcdir/src/$_gopkg/$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
+ install -pDm644 "$srcdir/src/$_gopkg/pacmon-mirrorlist.hook" "$pkgdir/usr/share/libalpm/hooks/pacmon-mirrorlist.hook"
+ install -pDm644 "$srcdir/src/$_gopkg/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
diff --git a/pacmon-mirrorlist.hook b/pacmon-mirrorlist.hook
deleted file mode 100644
index 97b4329463c..00000000000
--- a/pacmon-mirrorlist.hook
+++ /dev/null
@@ -1,9 +0,0 @@
-[Trigger]
-Operation = Install
-Operation = Upgrade
-Type = File
-Target = etc/pacman.d/mirrorlist
-
-[Action]
-When = PostTransaction
-Exec = /usr/bin/pacmon mirrorlist
diff --git a/pacmon.install b/pacmon.install
index ddc6fe07631..bd53adb819f 100644
--- a/pacmon.install
+++ b/pacmon.install
@@ -1,5 +1,4 @@
post_install() {
- getent passwd pacmon &>/dev/null || useradd -r -s /bin/false pacmon >/dev/null
/usr/bin/pacmon mirrorlist
true
}
diff --git a/pacmon.service b/pacmon.service
deleted file mode 100644
index d9cdae5b330..00000000000
--- a/pacmon.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=pacmon
-Wants=network-online.target
-After=network-online.target
-
-[Service]
-ExecStart=/usr/bin/pacmon
-User=pacmon
-Restart=always
-
-[Install]
-WantedBy=multi-user.target