summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fde8c338948678bcc96ac3db66efc398c1757545 (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
35
36
37
# Maintainer: Florian Bruhin (The Compiler) <archlinux.org@the-compiler.org>

pkgname=yourls-git
_gitname=YOURLS
pkgver=1.0.826.gb9844f1
pkgrel=1
pkgdesc="your own URL shortener"
arch=('any')
url="https://github.com/$_gitname/$_gitname"
license=('GPL3')
depends=('php>=4.3' 'mysql>=4.1')
makedepends=('git')
provides=('yourls')
conflicts=('yourls')
backup=('etc/webapps/yourls/config.php')
install=$pkgname.install
source=("git+https://github.com/$_gitname/${_gitname}.git")
sha1sums=('SKIP')

pkgver() {
  cd "$srcdir/$_gitname"
  git describe --always | sed 's|-|.|g'
}

package() {
  cd "$srcdir/$_gitname"
  mkdir -p "$pkgdir/usr/share/webapps/yourls" "$pkgdir/etc/webapps/yourls"

  cp -ra */ *.php "$pkgdir/usr/share/webapps/yourls"
  cp "sample-robots.txt" "$pkgdir/usr/share/webapps/yourls/robots.txt"
  mv "$pkgdir/usr/share/webapps/yourls/user/config-sample.php" \
     "$pkgdir/etc/webapps/yourls/config.php"
  ln -s "/etc/webapps/yourls/config.php" \
        "$pkgdir/usr/share/webapps/yourls/includes/config.php"
}

# vim:set ts=2 sw=2 et: