summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4980b51e4c3c76bd4dcb3b9f02c9adf888cab79f (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
38
39
40
# Maintainer: Simon Legner <Simon.Legner@gmail.com>
pkgname=wp2git-git
pkgver=r37.2fa9117
pkgrel=1
pkgdesc="A tool to download and import a Wikipedia page to a Git repository"
arch=('i686' 'x86_64')
url="https://github.com/CyberShadow/wp2git"
license=('custom')
depends=('curl' 'git')
makedepends=('git' 'gdc' 'd-stdlib')
source=(
  "$pkgname::git+https://github.com/CyberShadow/wp2git.git"
  "ae::git+https://github.com/CyberShadow/ae"
)
md5sums=('SKIP' 'SKIP')

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

prepare() {
  cd "$pkgname"
  git submodule init
  git config submodule.ae.url $srcdir/ae
  git submodule update
}

build() {
  cd "$pkgname"
  rdmd --build-only wp2git
}

package() {
  cd "$pkgname"
  install -Dm755 wp2git $pkgdir/usr/bin/wp2git
  install -D LICENSE $pkgdir/usr/share/licenses/wp2git-git/LICENSE
}

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