updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / cwpsu / PKGBUILD
blob8f587a4ee9f468348fba2968d722f7f3f61543ba
1 # Maintainer:  Elder Marco <eldermarco at gmail dot com>
3 pkgname=cwpsu
4 _pkgname=cwp_su_all
5 pkgver=42
6 pkgrel=4
7 pkgdesc="Open source software for seismic research and seismic processing"
8 arch=('i686' 'x86_64')
9 url="http://www.cwp.mines.edu/cwpcodes/"
10 license=('custom')
11 makedepends=('libxmu' 'libxi' 'mesa' 'freeglut' 'lesstif' 'gcc-fortran')
12 depends=('libxmu' 'libxi' 'mesa' 'freeglut' 'lesstif')
13 provides=('seismic-unix')
14 source=("ftp://ftp.cwp.mines.edu/pub/cwpcodes/${_pkgname}_${pkgver}.tgz"
15         "$pkgname-$pkgver-fix-compilers.patch"
16         "$pkgname-$pkgver-fix-paths.patch"
17         "$pkgname-$pkgver-no-confirm.patch"
18         "$pkgname.sh"
19         "$pkgname.csh")
20 md5sums=('258bb2b5a2617af7b3e35ff214802f60'
21          'f5d35d7672f0052775703e8710a071a7'
22          '95676a5e4267146bf4c050f8dfedbc67'
23          '36f9ccf15b2fcd7e754a939e688cb4d7'
24          '947958ab083318e61db852c0632fda03'
25          '8b68ffef691a4ce58525e8433000d619')
27 build() {
28     cd "$srcdir/src"
29     patch -Np1 -i ../$pkgname-$pkgver-fix-compilers.patch
30     patch -Np1 -i ../$pkgname-$pkgver-fix-paths.patch
31     patch -Np1 -i ../$pkgname-$pkgver-no-confirm.patch
32     export CWPROOT="$srcdir"
34     # Basict set of codes
35     make install
37     # X-toolkit applications
38     make xtinstall
40     # Fortran codes
41     make finstall
43     # Mesa/OpenGL items
44     make mglinstall
46     # libcwputils
47     make utils
50 package() {
51     cd "$srcdir"
53     # Binary files
54     mkdir -p "$pkgdir/opt/$pkgname/bin"
55     cp -pr bin/* "$pkgdir/opt/$pkgname/bin/"
57     # Include Headers
58     mkdir -p "$pkgdir/opt/$pkgname/include"
59     cp -pr include/* "$pkgdir/opt/$pkgname/include/"
61     # Libraries
62     mkdir -p "$pkgdir/opt/$pkgname/lib/"
63     cp -pr lib/* "$pkgdir/opt/$pkgname/lib/"
65     # Source Code and others (Yes, the program needs this...)
66     mkdir -p "$pkgdir/opt/cwpsu/src"
67     for _dir in doc cwp par psplot xplot Xtcwp 3D \
68                 Xmcwp su tri tetra faq comp xtri; do
69         cp -pr "src/$_dir" "$pkgdir/opt/cwpsu/src"
70     done
72     # Environment Variables
73     install -d -m0755 "$pkgdir/etc/profile.d"
74     install -m0755 "${pkgname}.sh" "$pkgdir/etc/profile.d"
75     install -m0755 "${pkgname}.csh" "$pkgdir/etc/profile.d"
77     # License file and acknowledgments
78     install -d -m0755 "$pkgdir/usr/share/licenses/$pkgname"
79     install -p -m0644 src/LEGAL_STATEMENT  \
80         "$pkgdir/usr/share/licenses/$pkgname/COPYING"
81     install -p -m0644 src/ACKNOWLEDGEMENTS \
82         "$pkgdir/usr/share/licenses/$pkgname/"
84 # expandtab:tabstop=4:shiftwidth=4