summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b39950d46df1f3d85e4b9fc02a5cf6382f9354a (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
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Maintainer: Christian Wolf <aur@christianwolf.email>
pkgname=circuit_macros
pkgver=9.0
pkgrel=1
epoch=
pkgdesc="Tools for drawing electric circuits and other line diagrams"
arch=('any')
url="https://ece.uwaterloo.ca/~aplevich/Circuit_macros/"
license=('LPPL')
groups=()
depends=('m4' 'dpic-git')
makedepends=()
checkdepends=()
optdepends=('texlive-core: LaTeX system to draw the diagrams')
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("https://ece.uwaterloo.ca/~aplevich/Circuit_macros/Circuit_macros$pkgver.tar.gz" 'circuit_macros.sh')
noextract=()
md5sums=('e486f477199b6ff8a54de11a98c1e3c2' '298fb2cffdc119b5c9b6a01175204f90')
validpgpkeys=()

prepare() {
    :
}

build() {
    cd "Circuit_macros$pkgver"
    rm -f examples/newp.txt
    make pgfdefault
}

package() {
	pushd "Circuit_macros$pkgver"
	
	LATEXDIR=`kpsewhich -var-value=TEXMFMAIN`/tex/latex/boxdims
	install -d $pkgdir$LATEXDIR
	install -m 644 boxdims.sty $pkgdir$LATEXDIR
	
	SHAREDIR=/usr/share/circuit_macros
	install -d $pkgdir$SHAREDIR
	install -m 755 *.m4 dpictools.pic $pkgdir$SHAREDIR
	
	DOCDIR=/usr/share/doc/circuit_macros
	install -d $pkgdir$DOCDIR
	install CHANGES Copying README $pkgdir$DOCDIR
	find doc/ examples/ -type d -exec install -d $pkgdir$DOCDIR/\{\} \;
	find doc/ examples/ -type f -exec install -m 644 \{\} $pkgdir$DOCDIR/\{\} \;
	
	popd
	
	install -d $pkgdir/etc/profile.d
	install -m 755 circuit_macros.sh $pkgdir/etc/profile.d
	#make DESTDIR="$pkgdir/" install
}