summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f9cee2687015d5cebed698541b03e7f162bb6439 (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
# Maintainer: Maxim Mikityanskiy <maxtram95@gmail.com>

_pkgname=mindforger
pkgname=$_pkgname-src
pkgver=1.49.2
pkgrel=1
pkgdesc="Thinking notebook and Markdown IDE. Search, browse, view and edit your Markdown files. Get as much as possible from knowledge in your remarks. (Build from source.)"
arch=('any')
url="https://github.com/dvorka/mindforger"
license=('GPL-2.0')
depends=('hicolor-icon-theme' 'qt5-base' 'qt5-svg' 'qt5-webkit' 'zlib')
optdepends=('dropbox: Dropbox syncing')
makedepends=('git')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=(
	"$_pkgname::git+https://github.com/dvorka/$_pkgname.git#tag=$pkgver"
	"$_pkgname-repository::git+https://github.com/dvorka/$_pkgname-repository.git#commit=05f3b4e"
)
sha256sums=('SKIP' 'SKIP')

prepare() {
	cd "$srcdir/$_pkgname"
	git submodule update --init --recursive
}

build() {
	cd "$srcdir/$_pkgname"

	mkdir -p deps/cmark-gfm/build
	cd deps/cmark-gfm/build
	cmake -DCMARK_TESTS=OFF -DCMARK_SHARED=OFF ..
	cmake --build .
	cd -

	cd deps/discount
	./configure.sh
	make
	cd -

	qmake-qt5 -r CONFIG+=mfnoccache mindforger.pro
	make V=1 VERBOSE=1
}

package() {
	cd "$srcdir/$_pkgname"
	make INSTALL_ROOT="$pkgdir" install

	# No need to install a package-specific static lib.
	rm "$pkgdir/usr/lib/libdiscount.a"

	cd "$srcdir/$_pkgname-repository"
	mkdir -p "$pkgdir/usr/share/doc/mindforger/"
	# Copy visible files only (excludes .git).
	cp -dr * "$pkgdir/usr/share/doc/mindforger/"
}