updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / ocs / PKGBUILD
blob60f305564c7e401d38a05decaee5d46162f7b599
1 # Contributor: Patrick Bartels <patrick.bartels@campus.tu-berlin.de>
2
3 # The patches were taken from Benjamin Drung's Debian package.
4 # See: http://bazaar.launchpad.net/~bdrung/+junk/ocs/files/head:/debian/
6 pkgname="ocs"
7 pkgver="2.4"
8 pkgrel="1"
9 pkgdesc="OPAL Compilation System for the OPAL functional programming language"
10 arch=("i686")
11 url="https://projects.uebb.tu-berlin.de/opal/trac/"
12 license=("GPL")
13 makedepends=("gcc" "glibc")
14 depends=("tcl" "tk" "readline" "flex")
15 source=("https://projects.uebb.tu-berlin.de/opal/trac/raw-attachment/wiki/OCS/ocs-$pkgver.tar.gz"
16         fix-typos.patch
17         fix-manpage-errors.patch
18         add-DESTDIR-support.patch
19         distclean-target.patch
20         use-system-wish.patch)
21 md5sums=("79c2a86eb4c60c1b54a0dd7cca9e8f7e"
22          "49750a197909e0b8f25823ae7053ae8c"
23          "1640717dd7a62fec5e8539a50d2b7924"
24          "9ebed4b72baae9dfa35bf9de28038659"
25          "19fcce22483339d49fbf3824d3a75a54"
26          "6c7b89485879dfe7eebecebdf5cddbdb")
28 build() {
29         cd "$srcdir/ocs-$pkgver"
31         msg2 "Applying patches..."
32         for patch in fix-typos.patch fix-manpage-errors.patch \
33                      add-DESTDIR-support.patch distclean-target.patch \
34                      use-system-wish.patch; do
35                 patch -Np1 -i "$srcdir/$patch"
36         done
38         msg2 "Configuring build environment..."
39         ./configure --prefix="/usr"
41         # Excerpt from Makefile.in:
42         #    usage:
43         #            @echo "There is no default target. Run \`make install' instead."
44         #            @echo "The build and installation steps of OCS are interleaved for"
45         #            @echo "bootstrapping reasons."
46         # Thus ocs cannot be installed in package()
47         msg2 "Building and installing ocs..."
48         make DESTDIR="$pkgdir" install
51 package() {
52         msg2 "Fixing ocs' folder structure to follow the Arch packaging standards..."
53         mkdir -p "$pkgdir/usr/share/doc/ocs"
54         mv "$pkgdir/usr/doc/"* "$pkgdir/usr/share/doc/ocs"
55         mv "$pkgdir/usr/examples" "$pkgdir/usr/share/doc/ocs"
56         mv "$pkgdir/usr/man" "$pkgdir/usr/share"
58         msg2 "Installing OPAL syntax highlighting file for VIM..."
59         install -D -m644  "$pkgdir/usr/lib/vim/opal.vim" \
60                 "$pkgdir/usr/share/vim/vimfiles/syntax/opal.vim"
62         msg2 "Removing unnecessary files..."
63         rm "$pkgdir/usr/VERSION"
64         rm -r "$pkgdir/usr/"{packages,doc,lib/{emacs,vim}}