diff options
author | Sur.en | 2022-04-30 20:19:20 +0400 |
---|---|---|
committer | Sur.en | 2022-04-30 20:19:20 +0400 |
commit | e2a75c617307b370f3f80312b2e6c673d491dd46 (patch) | |
tree | b9f0703a742c327b3c3151e7e1f4b2276379c251 /PKGBUILD | |
download | aur-e2a75c617307b370f3f80312b2e6c673d491dd46.tar.gz |
First package publication in the AUR
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d0f4e4fc2454 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Suren Kirakosyan <surenkirakosyan.am@gmail.com> + +pkgname=sarqx-reporter +pkgver=0.0.1 +pkgrel=1 +pkgdesc="CLI application." +arch=(i686 x86_64) +url=https://gitlab.com/sarqx_group/sarqx-reporter +license=('GPL') +depends=('erlang' 'elixir' 'dmidecode' 'zenity') +checkdepends=('systemd' 'sha1sum') +makedepends=(git make) +provides=($pkgname=$pkgver) +conflicts=($pkgname) + +prepare() { + git clone git@gitlab.com:sarqx_group/sarqx-reporter.git +} + +build() { + cd $pkgname + + make install +} + +package() { + cd $pkgname + + mkdir -p $pkgdir/opt/$pkgname/share/licenses + install -Dm644 LICENSE $pkgdir/opt/$pkgname/share/licenses + + # TODO: maybe I should change permission of bin files + mkdir -p $pkgdir/opt/$pkgname/bin + install -Dm755 $pkgname $pkgdir/opt/$pkgname/bin + install -Dm755 askpass.sh $pkgdir/opt/$pkgname/bin + + mkdir -p $pkgdir/usr/bin/ + ln -s /opt/$pkgname/bin/$pkgname $pkgdir/usr/bin/$pkgname + + mkdir -p $pkgdir/var/opt/$pkgname/logs + # HELP: chmod 600 provides read and write permission for user + chmod 644 $pkgdir/var/opt/$pkgname/logs + + # HELP: store config files + mkdir -p $pkgdir/etc/opt/$pkgname + chmod 600 $pkgdir/etc/opt/$pkgname + + # Create daemon file and give its name + systemd_file_name=$(make create_systemd) + + mkdir -p $pkgdir/etc/systemd/system + install -Dm644 $systemd_file_name $pkgdir/etc/systemd/system +} |