summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 290ea98c4f98c6caecc18e8ad3c93ae5211780c7 (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: VirtualTam <virtualtam@flibidi.net>
pkgname=xtrkcad-hg
pkgver=r681.1e0308838f6f
pkgrel=1
pkgdesc="CAD program for designing model railroad layouts."
url="http://www.xtrkcad.org/"
arch=('x86_64' 'i686')
license=('GPL2')
depends=('gtk2' 'webkitgtk2')
makedepends=('cmake' 'mercurial' 'gettext')
conflicts=('xtrkcad')
provides=('xtrkcad')
source=(hg+http://hg.code.sf.net/p/xtrkcad-fork/xtrkcad)
sha512sums=('SKIP')
_hgname='xtrkcad'

pkgver() {
  cd ${_hgname}
  printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}

build() {
  cd ${_hgname}
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_EXE_LINKER_FLAGS="-lm" -DCMAKE_BUILD_TYPE="Release" -DXTRKCAD_USE_GETTEXT="ON"
  make
}

package() {
  cd ${_hgname}
  make DESTDIR=${pkgdir} install
  install -Dm644 "app/lib/xtrkcad.desktop" "${pkgdir}/usr/share/applications/xtrkcad.desktop"
  install -Dm644 "app/lib/icon.png" "${pkgdir}/usr/share/pixmaps/xtrkcad.png"
}