summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2a1a512891be75ebde24bf5916cdd7bff1b11b59 (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
41
42
43
44
# Maintainer: justforlxz <justforlxz@gmail.com>

pkgname=deepin-gettext-tools-git
pkgver=1.0.8.r5.gc913e2d
pkgrel=1
pkgdesc='Deepin Gettext Tools'
arch=('any')
url="https://github.com/linuxdeepin/deepin-gettext-tools"
license=('GPL3')
depends=('gettext' 'python' 'perl-config-tiny' 'perl-xml-libxml')
makedepends=('git')
conflicts=('deepin-gettext-tools')
provides=('deepin-gettext-tools')
groups=('deepin-git')
source=("$pkgname::git+https://github.com/linuxdeepin/deepin-gettext-tools/")
sha512sums=('SKIP')

pkgver() {
    cd $pkgname
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $pkgname

  if [[ ! -z ${sha} ]];then
    git checkout -b $sha
  fi

  sed -e 's/sudo cp/cp/' -i src/generate_mo.py
  sed -e 's/qmake/qmake-qt5/' -e '/lupdate/d' -i Makefile
}

check() {
  cd $pkgname
  perl src/desktop_ts_convert.pl --help
  python src/generate_mo.py --help
  python src/update_pot.py --help
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}