summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3747803c3a938017299ae132f3209b67013e67ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Albakham <contact@geber.ga>

pkgname=domain-expiration-git
pkgver=r15.a23fe61
pkgrel=1
pkgdesc="Checks the expiration dates of domains."
arch=('any')
url="https://gitnet.fr/deblan/domain-expiration"
license=('GPL')
depends=('php>=7.3' 'whois' 'composer')
source=("$pkgname::git+https://gitnet.fr/deblan/domain-expiration")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "$srcdir/$pkgname"
  sed -i "1c\#!/usr/bin/env php" domain-expiration
  echo "Version ${pkgver} installation"
}

build() {
  cd "$srcdir/$pkgname"
  composer install
}

package() {
  install -d "$pkgdir/"{usr/bin,opt}
  cp -R $srcdir/$pkgname $pkgdir/opt/$pkgname
  ln -s /opt/$pkgname/domain-expiration $pkgdir/usr/bin/$pkgname
}