aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rader2023-09-13 20:04:04 -0400
committerDavid Rader2023-09-13 20:04:04 -0400
commitbe7762c0c0998f85e04ccb7c1500496282e419e9 (patch)
treecced902460eade40d6fa5dc0234e1f01ee8eb43b
parent6f645aeec3e199b30e67a93ce4bf439f2d3137f9 (diff)
downloadaur-be7762c0c0998f85e04ccb7c1500496282e419e9.tar.gz
relabel pkgname to avoid collision with upstream, move install to /usr/bin, various cleanup
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD45
-rw-r--r--README.md4
3 files changed, 24 insertions, 28 deletions
diff --git a/.gitignore b/.gitignore
index 06dc27f086ea..07729b0f2c86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
*.gz
*.zst
+
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
index 5a1dec7df095..f405c95121c4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,70 +6,61 @@
# Contributor: arad <arad@adercon.com>
# Contributor: nrad <nrad@adercon.com>
-pkgname=keepalived
+pkgname=keepalived-openrc
+_pkgname=keepalived
pkgver="2.2.8"
-pkgrel="1"
+pkgrel="2"
pkgdesc="keepalived bundled as an openrc based service"
arch=("x86_64")
-#~ url='https://www.keepalived.org/software/keepalived-2.2.8.tar.gz'
url='https://www.keepalived.org'
license=('GPL3')
-#~ depends=()
+depends=(openrc)
makedepends=('gcc' 'openssl' 'libnl' 'net-snmp')
#~ optdepends=()
#~ conflicts=()
-
install=keepalived.install
-
#changelog=CHANGELOG.md
-source=("$pkgname-$pkgver.tar.gz::$url/software/$pkgname-$pkgver.tar.gz")
+source=("$_pkgname-$pkgver.tar.gz::$url/software/$_pkgname-$pkgver.tar.gz")
md5sums=('8c26f75a8767e5341d82696e1e717115')
#~ prepare() {}
build() {
- cd "$pkgname-$pkgver"
- ./configure --prefix=/usr/local/$pkgname-$pkgver
+ cd "$_pkgname-$pkgver"
+ ./configure --prefix=/usr/local/$_pkgname-$pkgver
make
}
check() {
- cd "$pkgname-$pkgver"
+ cd "$_pkgname-$pkgver"
make -k check
}
package() {
- cd "$pkgname-$pkgver"
+ cd "$_pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
- sed -i -- 's|command="/sbin/$SVCNAME"|command="/usr/local/sbin/$SVCNAME"|g' "$pkgname/etc/openrc/$pkgname"
- sed -i -- 's|command_args="$KEEPALIVED_OPTS"|command_args="-f /etc/keepalived/keepalived.conf"|g' "$pkgname/etc/openrc/$pkgname"
+ sed -i -- 's|command="/bin/$SVCNAME"|command="/usr/bin/$SVCNAME"|g' "$_pkgname/etc/openrc/$_pkgname"
+ sed -i -- 's|command_args="$KEEPALIVED_OPTS"|command_args="-f /etc/keepalived/keepalived.conf"|g' "$_pkgname/etc/openrc/$_pkgname"
# remove the .service as its not needed on openrc systems
rm -rf "$pkgdir/no"
# the man pages
- rm -rf "$pkgdir/usr/local/$pkgname-$pkgver/share/man/man1/"
+ rm -rf "$pkgdir/usr/local/$_pkgname-$pkgver/share/man/man1/"
mkdir -p "$pkgdir/usr/share/man/"
- cp -R "$pkgdir/usr/local/$pkgname-$pkgver/share/man/" "$pkgdir/usr/share/"
+ cp -R "$pkgdir/usr/local/$_pkgname-$pkgver/share/man/" "$pkgdir/usr/share/"
# the sample config file
- install -Dm644 "$pkgname/etc/$pkgname/keepalived.conf.sample" -t "$pkgdir/etc/$pkgname/"
- rm -rf "$pkgdir/etc/$pkgname/samples"
+ install -Dm644 "$_pkgname/etc/$_pkgname/keepalived.conf.sample" -t "$pkgdir/etc/$_pkgname/"
+ rm -rf "$pkgdir/etc/$_pkgname/samples"
# the daemon
- install -Dm755 "$pkgdir/usr/local/$pkgname-$pkgver/sbin/$pkgname" -t "$pkgdir/usr/local/sbin/"
+ install -Dm755 "$pkgdir/usr/local/$_pkgname-$pkgver/sbin/$_pkgname" -t "$pkgdir/usr/bin"
# the openrc script
- install -Dm755 "$pkgname/etc/openrc/$pkgname" -t "$pkgdir/etc/init.d/"
+ install -Dm755 "$_pkgname/etc/openrc/$_pkgname" -t "$pkgdir/etc/init.d/"
# remove the extemporaneous stuff
- rm -rf "$pkgdir/usr/local/$pkgname-$pkgver/"
+ rm -rf "$pkgdir/usr/local"
}
-
-#~ post_install() {
- #~ # deploy the open-rc init script
- #~ cp "$pkgdir/$pkgname-$pkgver/$pkgname/etc/openrc/$pkgname /etc/init.d/$pkgname"
- #~ sed -i -- 's|command="/sbin/$SVCNAME"|command="/usr/local/sbin/$SVCNAME"|g' "/etc/init.d/$pkgname"
- #~ sed -i -- 's|command_args="$KEEPALIVED_OPTS"|command_args="-f /etc/keepalived/keepalived.conf"|g' "/etc/init.d/$pkgname"
-#~ }
diff --git a/README.md b/README.md
index 75c074e52f38..3bebe309b412 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,9 @@ A build of keepalived for openrc deployment - nothing fancy, nothing special.
NOTE: we recommend cloning into the ~/.aur/ directory - its not necessary but documentation assumes this location.
-- get PKGBUILD: `cd ~/.aur && git clone git@gitlab.com:drad/keepalived.git`
+NOTE: if you are running this as root you will need to preface all commands with `su user -c "command"`
+
+- get PKGBUILD: `cd ~/.aur && git clone https://gitlab.com/drad/keepalived.git`
### Build