summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b5d6404d8dffe8e42cb644b2fa5d8419aa071d1 (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
# Contributor: jaylectric <jonathan.chasteen@live.com> 
# Original PKGBUILD from reflexing <reflexing@reflexing.ru>
# Adapted for development version and new Python3 environment
# 
pkgname=wikidpad-dev
pkgver=2.3beta15
pkgrel=1
pkgdesc="wikidPad is a Wiki-like notebook for storing your thoughts, ideas, todo lists, contacts, or anything else you can think of to write down. [Development version]"
arch=('any')
url="http://wikidpad.sourceforge.net/"
license=('custom')
depends=('wxpython' 'python2-pysqlite')
makedepends=('unzip')
provides=('wikidpad')
conflicts=('wikidpad')
replaces=('wikidpad')
source=(http://downloads.sourceforge.net/wikidpad/WikidPad-$pkgver-src.zip
    wikidpad-dev
    wikidpad-dev.desktop
    wikidpad-dev.png
)

noextract=(WikidPad-$pkgver-src.zip)
md5sums=('1cf253fd7444c0dbfa64ae7b74c31186'
         '37ff74df2af02a091c7b8d8533d5ad2b'
         'e93014425c38f4a7a023258fde5ac512'
         'c44e552a8b856610a3e859d1602d5cf1') 

prepare() {
    cd "$srcdir"
	
	# proper extract
	mkdir $pkgname-$pkgver
	unzip WikidPad-$pkgver-src.zip -d $pkgname-$pkgver
	
	# Patch for Python2 compatibility
	cd $pkgname-$pkgver
	sed -i -e "s|env python|env python2|" *.py
	sed -i -e "s|/bin/python|/usr/bin/python2|" *.py
	cd ..
}

package() {
    # dirty copying whole Python sources due to the lack of good 'python setup.py install'
    # functionality (TODO: setup.py fixes to make it crossplatform)
    mkdir -p $pkgdir/usr/share/$pkgname
    cp -r $pkgname-$pkgver/* $pkgdir/usr/share/$pkgname
  
    # install run wrapper
    install -Dm755 $srcdir/$pkgname $pkgdir/usr/bin/$pkgname
      
    # install icons
    install -Dm644 $srcdir/$pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
          
    # install DE menu items
    install -Dm644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
}