summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b964c47187693060b2fc3579fe4abfcee884b5e (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
# Maintainer:
# Contributor: Balló György <ballogyor+arch at gmail dot com>

pkgname=markmywords
pkgver=0.1.3
pkgrel=1
pkgdesc="Minimal Markdown editor"
arch=(x86_64)
url="https://github.com/voldyman/MarkMyWords"
license=(MIT)
depends=(discount gtksourceview3 webkit2gtk)
makedepends=(cmake vala)
source=(https://github.com/voldyman/MarkMyWords/archive/v$pkgver/MarkMyWords-$pkgver.tar.gz
        discount.patch
        appdata.patch)
sha256sums=('d7c0c09ef9dce842721a3e957336b77bd1ac157ef5866c56cc81ddc759fba4f0'
            'b62642e8034962ee726a44ad224e08b05b15f3790561c6fe6c21e96e447b096c'
            '3d1507a0f2c461eafbeff4750d4d95cf4d91e5bda12a95785a3fa156e9e7dbc0')

prepare() {
  [[ -d build ]] || mkdir build
  cd MarkMyWords-$pkgver
  patch -Np1 -i ../discount.patch
  patch -Np1 -i ../appdata.patch
  sed -i 's/string args\[\]/string[] args/' src/Main.vala
  sed -i 's|pixmaps|icons/hicolor/scalable/apps|' CMakeLists.txt
  sed -i 's/document-export/document-revert/' resources/toolbar.ui resources/headerbar.ui 
}

build() {
  cd build
  cmake -G "Unix Makefiles" ../MarkMyWords-$pkgver/ \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DGSETTINGS_LOCALINSTALL=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
  install -Dm644 ../MarkMyWords-$pkgver/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}