1 | #!/bin/bash |
---|
2 | # Download vmime patches from: http://developer.zarafa.com/download/zarafa-vmime-patches.tar.gz |
---|
3 | |
---|
4 | #######Essential package info. |
---|
5 | #Change these if autodetection fails. |
---|
6 | |
---|
7 | #Name of the Syn-3 package that we are going to create |
---|
8 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
9 | |
---|
10 | #Archive of the sourcefiles to unpack |
---|
11 | SRC_ARC=`ls *.tar.*` |
---|
12 | |
---|
13 | #Version of the sourcefiles |
---|
14 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` |
---|
15 | |
---|
16 | #Directory of the sourcefiles to build (after optional unpacking) |
---|
17 | SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` |
---|
18 | |
---|
19 | #Architecture that the created binaries run on. |
---|
20 | #Use noarch for scripts. |
---|
21 | ARCH=`uname -m` |
---|
22 | |
---|
23 | |
---|
24 | ########Build and create the pacakge. |
---|
25 | #Uncomment the stuff that you dont want or need |
---|
26 | |
---|
27 | #Unpack source |
---|
28 | #(uncomment if not needed) |
---|
29 | syn3_unpack $SRC_ARC || exit 1 |
---|
30 | |
---|
31 | #apply patches |
---|
32 | for PATCH in *.diff; do |
---|
33 | patch -p1 -d $SRC_DIR < $PATCH|| exit 1 |
---|
34 | done |
---|
35 | |
---|
36 | #build and install sourcefiles |
---|
37 | #./configure optiones: |
---|
38 | export CONFIGURE_OPTS="--disable-sasl --disable-tls" |
---|
39 | #options for all make commands: |
---|
40 | export MAKE_OPTS="" |
---|
41 | #skip testing: |
---|
42 | #export NOTEST=1 |
---|
43 | #extra optiones for the make install command, use with INSTALL_BASE for example: |
---|
44 | export INSTALL_OPTS="" |
---|
45 | syn3_build_automake $SRC_DIR /tmp/pkg || exit 1 |
---|
46 | |
---|
47 | |
---|
48 | mkdir -p /tmp/pkg/etc/postinst.d |
---|
49 | cp post.libvmime /tmp/pkg/etc/postinst.d |
---|
50 | chmod +x /tmp/pkg/etc/postinst.d/post.libvmime || exit 1 |
---|
51 | |
---|
52 | #strip bins and other stuff |
---|
53 | syn3_strip /tmp/pkg || exit 1 |
---|
54 | |
---|
55 | #move development stuff and create seperate development package |
---|
56 | syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 |
---|
57 | syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 |
---|
58 | |
---|
59 | #make main package |
---|
60 | syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1 |
---|
61 | |
---|
62 | |
---|