aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 70f5375a5202513b1e74bed43c84364bc095b8b5 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: Carsten Schlote <carsten.schlote@gmail.com>

pkgname='plantumlqeditor-va-git'
pkgver=r167.bf0e91b
pkgrel=1
pkgdesc='PlantUML QEditor is a simple editor written in Qt5 for PlantUML (vahanus fork)'
epoch=1
arch=('any')
url='https://github.com/cschlote/plantumlqeditor'
license=('GPL3')
depends=(glibc qt5-base hicolor-icon-theme qt5-svg gcc-libs)
optdepends=('plantuml' 'graphviz')
makedepends=('git')
conflicts=('plantumlqeditor-git')
install="$pkgname".install
source=('git+https://github.com/cschlote/plantumlqeditor.git')
md5sums=('SKIP')

prepare() {
    [[ -d build ]] && rm -r build
    mkdir build
}

build() {
    cd build
    qmake-qt5 "$srcdir"/plantumlqeditor
    make
}

package() {
    cd "$srcdir"/build
    mkdir -p "$pkgdir"/usr/bin/
    cp plantumlqeditor "$pkgdir"/usr/bin/

    cd "$srcdir"/plantumlqeditor

    mkdir -p "$pkgdir"/usr/share/applications/
    mkdir -p "$pkgdir"/usr/share/applications/plantumlqeditor
    mkdir -p "$pkgdir"/usr/share/applications/plantumlqeditor/icons
    mkdir -p "$pkgdir"/usr/share/icons/hicolor/32x32/apps
    mkdir -p "$pkgdir"/usr/share/icons/hicolor/48x48/apps
    mkdir -p "$pkgdir"/usr/share/icons/hicolor/64x64/apps

    cp assistant.xml "$pkgdir"/usr/share/applications/plantumlqeditor/assistent.xml
    cp icons/*.svg "$pkgdir"/usr/share/applications/plantumlqeditor/icons/

    cp plantumlqeditor.desktop "$pkgdir"/usr/share/applications/plantumlqeditor.desktop

    cp icon32.png "$pkgdir"/usr/share/icons/hicolor/32x32/apps/plantumlqeditor.png
    cp icon48.png "$pkgdir"/usr/share/icons/hicolor/48x48/apps/plantumlqeditor.png
    cp icon64.png "$pkgdir"/usr/share/icons/hicolor/64x64/apps/plantumlqeditor.png
}

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