diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2015-09-29 16:07:41 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2015-09-29 16:13:11 +0200 |
commit | b5ec9730c022a6686955a4648329868cfdd598af (patch) | |
tree | f20e7c8629a0d339076c0ef2ca162391c196b8f2 /testing/csync2 | |
parent | fa6505dc69a2a6945324744d8134de0b186be808 (diff) | |
download | aports-b5ec9730c022a6686955a4648329868cfdd598af.tar.bz2 aports-b5ec9730c022a6686955a4648329868cfdd598af.tar.xz |
testing/csync2: remove post-install file and add a few minor fixes
Diffstat (limited to 'testing/csync2')
-rw-r--r-- | testing/csync2/APKBUILD | 32 | ||||
-rw-r--r-- | testing/csync2/csync2.initd | 3 | ||||
-rw-r--r-- | testing/csync2/csync2.post-install | 24 | ||||
-rw-r--r-- | testing/csync2/csync2.post-upgrade | 4 |
4 files changed, 24 insertions, 39 deletions
diff --git a/testing/csync2/APKBUILD b/testing/csync2/APKBUILD index 5b32bad425..ada4ab4fa2 100644 --- a/testing/csync2/APKBUILD +++ b/testing/csync2/APKBUILD @@ -1,20 +1,25 @@ +# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> +# Contributor: Valery Kartel <valery.kartel@gmail.com> +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=csync2 pkgver=2.0 -pkgrel=0 +pkgrel=1 pkgdesc="Cluster synchronization tool" url="http://oss.linbit.com/csync2/" arch="all" -license="GPL-2+" +license="GPL2+" +depends="" +depends_dev="" makedepends="librsync-dev gnutls-dev sqlite-dev mysql-dev postgresql-dev" +install="$pkgname.post-upgrade" subpackages="$pkgname-compare $pkgname-doc" source="http://oss.linbit.com/$pkgname/$pkgname-$pkgver.tar.gz longlong-format.patch rsync-strlcpy-disable.patch $pkgname.initd" -install="$pkgname.post-install $pkgname.post-upgrade" _builddir="$srcdir"/$pkgname-$pkgver - prepare() { cd "$_builddir" for i in $source; do @@ -40,26 +45,31 @@ build() { package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 - install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - cp doc/* "$pkgdir"/usr/share/doc/$pkgname/ + cp doc/* "$pkgdir"/usr/share/doc/$pkgname/ || return 1 + + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 } compare() { subpkgdesc="csync2 compare script" arch="noarch" - depents="bash perl-digest-md5" + depends="bash perl-digest-md5" + mkdir -p "$subpkgdir"/usr/sbin - mv "$pkgdir"/usr/sbin/$pkgname-compare "$subpkgdir"/usr/sbin/ + mv "$pkgdir"/usr/sbin/$pkgname-compare \ + "$subpkgdir"/usr/sbin/ || return 1 } + md5sums="4069fc9e86e8508c392fe2862059eb91 csync2-2.0.tar.gz 8fc73254db29316f9125761d18f1ed46 longlong-format.patch 5908c4106d4866ab1c1f88f4c9482c9f rsync-strlcpy-disable.patch -05df8f2b877e7d8ca838df9e71bf2c65 csync2.initd" +bf77ad1534addbd596a08d1f7084e85e csync2.initd" sha256sums="11cb37380fb185bce0c22b804fec9b01c385d9d83cc528cfd48d748453834fa2 csync2-2.0.tar.gz afb1317987cc4b81908bc437269162c7af23b34e6842306483da5b53efce2db3 longlong-format.patch 339c7f5d91ff7ed3e63de5a5e39cf17efd7533f9c460eb81db76003acb164017 rsync-strlcpy-disable.patch -77f6baf688fdb6938846e9f6e0e945d4085d2f0002661ff335e5c8ac39f0069a csync2.initd" +0c1488e6bca746d8e5c5e3d893997b94e3c1766de69270d7c5c5a2282fb3b767 csync2.initd" sha512sums="f91fd222f67affe9634471d341b43ff67854a6ed25b620301a454e98a79a9fb80b2a66eb8713546758fd08300d52751e5ca7472c696daa20ee11779b87a830f8 csync2-2.0.tar.gz 38a17cbf23cbccd4996ad1af049851e33179586e619e3f3edbfacbaa36662e44d916839acd59b1cfc67b3af9042c3258068ec9e5b57f7e26c00a41a0e6f0e148 longlong-format.patch c44ad7e7fb7093f66fd9582b5309e3929dfdf7b76ef4d234d346fa25158f088b9436db9a1989d036d739570459867210d053af62125facb66e4f5202448c7bea rsync-strlcpy-disable.patch -96e5fb1a8865981a014f368b3a644659d048183534a72332718aa815fdf28180e758005e8ae7c438bb8b36134719c2597dd44fc09c85ba13e150f6d396d6b25b csync2.initd" +5050af0004679c7c63e0eb41a8dfed9ca1d92ce6acaee7c5e2150ce808474c61e6feb84f9b77185a282fbb36de9b981e1eab937ee0fb1ec045ab587960fda812 csync2.initd" diff --git a/testing/csync2/csync2.initd b/testing/csync2/csync2.initd index 0caa339d61..424a1e2628 100644 --- a/testing/csync2/csync2.initd +++ b/testing/csync2/csync2.initd @@ -3,9 +3,8 @@ name="$SVCNAME" pidfile="/var/run/$SVCNAME.pid" command="/usr/sbin/$SVCNAME" -command_args="-ii" +command_args="-ii${CSYNC2_OPTS:+ $CSYNC2_OPTS}" command_background="yes" -required_files="/etc/csync2/csync2.cfg /etc/csync2/csync2_ssl_key.pem /etc/csync2/csync2_ssl_cert.pem" depend() { need net localmount diff --git a/testing/csync2/csync2.post-install b/testing/csync2/csync2.post-install deleted file mode 100644 index 3c2ecc1ecf..0000000000 --- a/testing/csync2/csync2.post-install +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -SSL="/etc/csync2/csync2_ssl_" -SERV="/etc/services" -INETD="/etc/inetd.conf" - -if [ ! -f ${SSL}key.pem -o ! -f ${SSL}cert.pem ]; then - openssl genrsa -out ${SSL}key.pem 1024 &> /dev/null - yes '' | openssl req -new -key ${SSL}key.pem -out ${SSL}cert.csr &> /dev/null - openssl x509 -req -days 3600 -in ${SSL}cert.csr -out ${SSL}cert.pem -signkey ${SSL}key.pem &> /dev/null - rm ${SSL}cert.csr -fi - -if [ ! -f ${SERV} ]; then - touch ${SERV} -fi -grep -q csync2 ${SERV} || echo -e "csync2\t\t30865/tcp" >> ${SERV} - -if [ ! -f ${INETD} ]; then - touch ${INETD} -fi -grep -q csync2 ${INETD} || echo "csync2 stream tcp nowait root /usr/sbin/csync2 csync2 -i" >> ${INETD} - -exit 0 diff --git a/testing/csync2/csync2.post-upgrade b/testing/csync2/csync2.post-upgrade index 26f8e45124..48ac7a01d2 100644 --- a/testing/csync2/csync2.post-upgrade +++ b/testing/csync2/csync2.post-upgrade @@ -1,6 +1,6 @@ #!/bin/sh -mv /etc/csync2.cfg /etc/csync2/ &> /dev/null -mv /etc/csync2_ssl_*.pem /etc/csync2/ &> /dev/null +mv /etc/csync2.cfg /etc/csync2/ >/dev/null 2>&1 +mv /etc/csync2_ssl_*.pem /etc/csync2/ >/dev/null 2>&1 exit 0 |