diff options
author | Julien Freyermuth | 2017-05-26 00:13:26 +0200 |
---|---|---|
committer | Julien Freyermuth | 2017-05-26 00:13:26 +0200 |
commit | 5b745281e1d94858c0a1e6fbcbfd50472a0f80d3 (patch) | |
tree | 4d63fb76d58c61f20fb37f537c53eef1a47eac56 | |
download | aur-5b745281e1d94858c0a1e6fbcbfd50472a0f80d3.tar.gz |
Ajout de la fin du programme
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | reducemp4video-0.0.1.tar.gz | bin | 0 -> 3906 bytes | |||
-rw-r--r-- | reducemp4video.install | 41 |
4 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c256a7418635 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +# Generated by mksrcinfo v8 +# Thu May 25 22:13:08 UTC 2017 +pkgbase = reducemp4video + pkgdesc = Program that reduce size of mp4 video + pkgver = 0.0.1 + pkgrel = 2 + url = https://github.com/Chipsterjulien/reduceMP4Video + install = reducemp4video.install + arch = any + license = WTFPL + makedepends = go + options = !strip + source = reducemp4video-0.0.1.tar.gz + sha512sums = 84e537912b6f2e1fa2540e1acbf293dd7f6846196de846afcaa2fc8ce6dce3df771be0f3ec76b21ed3f31ff134952315a4b86ec8debf92fda2cb747b421f56e6 + +pkgname = reducemp4video + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..226a0609f7f7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,66 @@ +# Maintainer: Chipster Julien <julien dot chipster @ archlinux dot fr> + +pkgname=reducemp4video +pkgver=0.0.1 +pkgrel=2 +pkgdesc="Program that reduce size of mp4 video" +arch=('any') +url="https://github.com/Chipsterjulien/reduceMP4Video" +license=('WTFPL') +makedepends=('go') +options=('!strip') +source=("$pkgname-$pkgver.tar.gz") +install=reducemp4video.install + +_builddir="$pkgname-$pkgver" + +build() { + GOPATH_exist=1 + if [ -z $GOPATH ]; then + # path don't exit + GOPATH_exist=0 + + # create gopath directory + mkdir -p .gopath/{bin,src} + # export var + export GOPATH=~/.gopath + fi + + # Getting some libs + echo "Install go-logging" + go get github.com/op/go-logging + echo "Install viper" + go get github.com/spf13/viper + echo "Install email" + go get github.com/jordan-wright/email + + cd "$_builddir" + + go build || return 1 + + if [ $GOPATH_exist == 0 ]; then + rm -rf ~/.gopath + export GOPATH= + fi +} + +package() { + cd "$_builddir" + + # reducemp4video_sample.toml + install -Dm644 cfg/"$pkgname"_sample.toml \ + "$pkgdir"/etc/$pkgname/"$pkgname"_sample.toml || return 1 + + # Create log directory + install -dm755 "$pkgdir"/var/log/$pkgname || return 1 + + # reducemp4video.service + install -Dm644 systemd/"$pkgname".service \ + "$pkgdir"/usr/lib/systemd/system/"$pkgname".service || return 1 + + # reducemp4video binary + install -m755 -o root -g root -D "$srcdir"/$pkgname-$pkgver/$pkgname-$pkgver \ + "$pkgdir"/usr/bin/$pkgname || return 1 +} + +sha512sums=('84e537912b6f2e1fa2540e1acbf293dd7f6846196de846afcaa2fc8ce6dce3df771be0f3ec76b21ed3f31ff134952315a4b86ec8debf92fda2cb747b421f56e6') diff --git a/reducemp4video-0.0.1.tar.gz b/reducemp4video-0.0.1.tar.gz Binary files differnew file mode 100644 index 000000000000..b34dd07f1814 --- /dev/null +++ b/reducemp4video-0.0.1.tar.gz diff --git a/reducemp4video.install b/reducemp4video.install new file mode 100644 index 000000000000..3f2b451614a5 --- /dev/null +++ b/reducemp4video.install @@ -0,0 +1,41 @@ +post_install() { + pkgname=searchnewdoconaidop + + # Fixing membership + chown users: /var/log/$pkgname + chown -R users: /etc/$pkgname + + # Reload systemctl + systemctl daemon-reload + + echo "Adding reducemp4video in systemctl:" + echo " systemctl enable reducemp4video" + echo " systemctl start reducemp4video" + + true +} + +post_upgrade() { + chown users: /var/log/$pkgname + chown -R users: /etc/$pkgname + + # Reload systemctl + systemctl daemon-reload + + echo "You should restart sshd_autoban:" + echo " systemctl restart sshd_autoban" + + true +} + +pre_remove() { + pkgname=reducemp4video + # Remove symlink in systemd + systemctl disable $pkgname + # Stop server + systemctl stop $pkgname + # Reload systemctl + # systemctl daemon-reload + + true +} |