1 # Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
6 pkgdesc="Extract data from gcm and szs files. Contains gcmdump, yaz0dec, and rarcdump"
8 url="http://www.amnoid.de/gc/"
10 source=('http://www.amnoid.de/gc/szstools.zip')
11 sha512sums=('c75bf30f39291687242be89cbf6f33a82fb6d152c05089066065b8324763ff6314116306c6df557fa072e1c1311bf566318c658de32f4ce195eee89b8cc640bd')
17 g++ yaz0dec.cpp -o yaz0dec
19 # The other source code needs to be modified as it was written to compile with the
20 # Digital Mars compiler (includes direct.h)
22 # Replace 'direct.h' with 'sys/stat.h'
23 sed -i 's/direct.h/sys\/stat.h/' rarcdump.cpp gcmdump.cpp
25 # Change '_mkdir' to 'mkdir' with '0755' permissions
26 sed -i 's/_mkdir(\(.*\));/mkdir(\1, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);/g' rarcdump.cpp gcmdump.cpp
28 # Change '_chdir' to 'chdir'
29 sed -i 's/_chdir/chdir/g' rarcdump.cpp gcmdump.cpp
32 g++ rarcdump.cpp -o rarcdump
35 g++ gcmdump.cpp -o gcmdump
42 install -Dm755 yaz0dec "${pkgdir}/usr/bin/yaz0dec"
45 install -Dm755 rarcdump "${pkgdir}/usr/bin/rarcdump"
48 install -Dm755 gcmdump "${pkgdir}/usr/bin/gcmdump"
51 # vim:set ts=2 sw=2 et: