summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b13c77cb23e2dda6c9bd3b574153388085eb37c (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Maintainer: kitech1 <vatic@vivaldi.net>
pkgname=edrawmax
pkgver=9.1
pkgrel=1
pkgmaver=9
pkgmaname=EdrawMax
epoch=
pkgdesc="All-in-One Diagram Software"
arch=('x86_64')
url="http://www.edrawsoft.cn/edrawmax/"
license=('custom:"Copyright EdrawSoft 2004-2018; All Rights Reserved."')
groups=()
depends=(qt5-base)
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=(!strip !upx)
install=
changelog=
source=(http://www.edrawsoft.cn/2download/$pkgname-$pkgmaver-64-cn.run.tgz)
md5sums=('bba2467bde6c8a7339454460f7c18d23')
noextract=()

prepare() {
  line=37  # head -n 3 file.run to get the line
  echo "Unpack bash binary..."
  tail -n +$line $pkgmaname-$pkgmaver-64-cn.run > $pkgname-$pkgver.tar.gz
  rm -f $pkgmaname-$pkgmaver-64-cn.run
}

build() {
  echo "Extracting files..."
  tar zxf $pkgname-$pkgver.tar.gz
  rm -f $pkgname-$pkgver.tar.gz
}

check() {
  cd "$srcdir/$pkgmaname-$pkgmaver"
}

package() {
  cd "$srcdir/$pkgmaname-$pkgmaver"
  mkdir -p "$pkgdir/opt/$pkgmaname-$pkgmaver"
  mv * "$pkgdir/opt/$pkgmaname-$pkgmaver/"

  cd "$pkgdir/opt/$pkgmaname-$pkgmaver"
  mv "lib" "lib.bak"

  mkdir -p $pkgdir/usr/share/icon/
  mkdir -p $pkgdir/usr/share/applications/
  mkdir -p $pkgdir/usr/share/mime/packages/
  mkdir -p $pkgdir/usr/share/icons/gnome/scalable/mimetypes/
  mkdir -p $pkgdir/usr/bin/
  cp -f edrawmax.png $pkgdir/usr/share/icons/
  cp -f edrawmax.desktop $pkgdir/usr/share/applications/
  cp -f edrawmax.xml $pkgdir/usr/share/mime/packages/
  cp -f eddx.svg $pkgdir/usr/share/icons/gnome/scalable/mimetypes/

  mkdir -p lib
  cp -a ./lib.bak/libqtitanribbon.so* ./lib/
  cp -a ./lib.bak/libBaseCore.so* ./lib/
  cp -a ./lib.bak/libedgraphics.so* ./lib/
  cp -a ./lib.bak/libObjectModule.so* ./lib/
  cp -a ./lib.bak/libOSSC.so* ./lib/
  cp -a ./lib.bak/libImporter.so* ./lib/
  cp -a ./lib.bak/libExporter.so* ./lib/

  rm -fr ./lib.bak
  rm -f qt.conf
  rm -fr plugins
  # rm -fr library sample  # big directory, uncomment for test
}

# vim:set ts=2 sw=2 et: