summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 69724b43b3ca5aec299ec2aa61064bef37890ae8 (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
# Maintainer: Pierpaolo Valerio <gondsman@techgeek.co.in>
pkgname=cirkuit-kf5-git
pkgver=r406.d9ff4c1
pkgrel=1
pkgdesc="Small application helping you to create circuit diagrams"
arch=('i686' 'x86_64')
url="git://anongit.kde.org/cirkuit.git"
license=('GPL')
depends=('poppler-qt5' 'm4' 'ghostscript' 'texlive-pstricks' 'netpbm' 'knewstuff' 'ktexteditor' 'kdelibs4support' 'hicolor-icon-theme')
optdepends=('dpic')
makedepends=('git' 'texlive-core' 'automoc4' 'cmake' 'extra-cmake-modules' 'kdesignerplugin')
provides=('cirkuit')
conflicts=('cirkuit')
source=("git://anongit.kde.org/cirkuit.git#branch=frameworks")
md5sums=('SKIP')
_gitname=cirkuit
options=('!makeflags')

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

prepare() {
  cd "$_gitname"/src/backends
  sed -i 's/SERVICE_TYPES cirkuit_backend.desktop/DEFAULT_SERVICE_TYPE/g' circuitmacros/CMakeLists.txt
  sed -i 's/SERVICE_TYPES cirkuit_backend.desktop/DEFAULT_SERVICE_TYPE/g' gnuplot/CMakeLists.txt
  sed -i 's/SERVICE_TYPES cirkuit_backend.desktop/DEFAULT_SERVICE_TYPE/g' null/CMakeLists.txt
  sed -i 's/SERVICE_TYPES cirkuit_backend.desktop/DEFAULT_SERVICE_TYPE/g' pstricks/CMakeLists.txt
  sed -i 's/SERVICE_TYPES cirkuit_backend.desktop/DEFAULT_SERVICE_TYPE/g' tikz/CMakeLists.txt
  cd ..
  sed -i 's/loadFile(filename)/loadFile(KUrl(filename))/g' mainwindow.cpp
}

build() {
  cd "$_gitname"
  rm -rf build
  mkdir  build
  cd build
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr
  make clean
  make
}

package() {
  cd "$_gitname"/build
  make DESTDIR=${pkgdir} install
  mv ${pkgdir}/usr/lib64/* ${pkgdir}/usr/lib
  rmdir ${pkgdir}/usr/lib64
  rm -rf ${pkgdir}/usr/share/apps/katepart/syntax/gnuplot.xml
}