aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Dickert <marco@misterunknown.de>2019-12-09 12:25:36 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-12-10 19:18:56 +0100
commit0ffb45c3fd16276616bf5e0753cc3f0cf456f273 (patch)
treea85b447d4adc11b9fa333a1ddc6bc57a637ada32
parent5fbd2747b996dc62d511e8e18a6a4a1696ffb6c1 (diff)
downloadaports-0ffb45c3fd16276616bf5e0753cc3f0cf456f273.tar.gz
aports-0ffb45c3fd16276616bf5e0753cc3f0cf456f273.tar.bz2
aports-0ffb45c3fd16276616bf5e0753cc3f0cf456f273.tar.xz
main/msmtp: Add openrc package for the service
Signed-off-by: Marco Dickert <marco@misterunknown.de>
-rw-r--r--main/msmtp/APKBUILD17
-rw-r--r--main/msmtp/msmtp.confd5
-rwxr-xr-xmain/msmtp/msmtp.initd10
3 files changed, 26 insertions, 6 deletions
diff --git a/main/msmtp/APKBUILD b/main/msmtp/APKBUILD
index 10f69f1795..0192560f06 100644
--- a/main/msmtp/APKBUILD
+++ b/main/msmtp/APKBUILD
@@ -2,18 +2,19 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=msmtp
pkgver=1.8.6
-pkgrel=0
+pkgrel=1
pkgdesc="SMTP client with a sendmail compatible interface"
url="https://marlam.de/msmtp/"
arch="all"
license="GPL-3.0-or-later"
options="!check" # no test suite
makedepends="gettext-dev gnutls-dev"
-subpackages="$pkgname-doc $pkgname-lang $pkgname-vim:vim:noarch"
-source="https://marlam.de/msmtp/releases/msmtp-$pkgver.tar.xz"
+subpackages="$pkgname-doc $pkgname-lang $pkgname-openrc $pkgname-vim:vim:noarch"
+source="https://marlam.de/msmtp/releases/msmtp-$pkgver.tar.xz
+ msmtp.confd
+ msmtp.initd"
build() {
- cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -25,8 +26,10 @@ build() {
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
+
+ install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
+ install -Dm644 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
}
vim() {
@@ -37,4 +40,6 @@ vim() {
"$subpkgdir"/usr/share/vim/vimfiles/syntax/$pkgname.vim
}
-sha512sums="9d3dd282ddfe2d67b67bb6d29412beebcd666d4ab8e90a664b7dd4b951714da0e3adba72dbe165617b1a170779bcd45e2e7bcf54d1d96fa97089686e71cbea66 msmtp-1.8.6.tar.xz"
+sha512sums="9d3dd282ddfe2d67b67bb6d29412beebcd666d4ab8e90a664b7dd4b951714da0e3adba72dbe165617b1a170779bcd45e2e7bcf54d1d96fa97089686e71cbea66 msmtp-1.8.6.tar.xz
+3839d7e8400cf897830c674f59563e225096d9755121d1ac14f3b493ab4cc0672228a9b14b9d9620d566593e2ae27d322a78c46791c6b5166ab82275d25dc0d3 msmtp.confd
+6845e1c5b1d31ade044dc5719a4d9602ea775e73ebd9084536a96165732f5a331f92384773131cda502befc673842ed2a418e38f33dceedaae18dbe452ef2353 msmtp.initd"
diff --git a/main/msmtp/msmtp.confd b/main/msmtp/msmtp.confd
new file mode 100644
index 0000000000..cace916f08
--- /dev/null
+++ b/main/msmtp/msmtp.confd
@@ -0,0 +1,5 @@
+# defaut config
+
+#MSMTP_INTERFACE="127.0.0.1"
+#MSMTP_PORT="25"
+#MSMTP_COMMAND="/usr/bin/msmtp -f %F"
diff --git a/main/msmtp/msmtp.initd b/main/msmtp/msmtp.initd
new file mode 100755
index 0000000000..38ae4c336f
--- /dev/null
+++ b/main/msmtp/msmtp.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+
+: ${MSMTP_INTERFACE:="127.0.0.1"}
+: ${MSMTP_PORT:="25"}
+: ${MSMTP_COMMAND:="/usr/bin/msmtp -f %F"}
+
+pidfile="/var/run/${SVCNAME}"
+command="/usr/bin/${SVCNAME}"
+command_args="--interface=$MSMTP_INTERFACE --port=$MSMTP_PORT --command=$MSMTP_COMMAND "
+command_background="yes"