[c5c522c] | 1 | #!/bin/bash |
---|
[516e1e9] | 2 | |
---|
[4aea2ca] | 3 | #Source: https://github.com/Kopano-dev/vmime/releases |
---|
| 4 | |
---|
[516e1e9] | 5 | #DEP:imagemagick |
---|
| 6 | #NEED:cmake |
---|
[cf6b9ba] | 7 | ##DEP:boost |
---|
[516e1e9] | 8 | #NEED:doxygen |
---|
| 9 | #DEP:gnutls |
---|
| 10 | #DEP:openssl |
---|
| 11 | #NEED:linuxdoc_tools |
---|
| 12 | |
---|
| 13 | #?BuildRequires: inkscape |
---|
| 14 | |
---|
| 15 | set -e |
---|
[c5c522c] | 16 | |
---|
| 17 | #######Essential package info. |
---|
| 18 | #Change these if autodetection fails. |
---|
| 19 | |
---|
| 20 | #Name of the Syn-3 package that we are going to create |
---|
| 21 | NAME=`basename $0|sed 's/.SlackBuild//'` |
---|
| 22 | |
---|
| 23 | #Archive of the sourcefiles to unpack |
---|
| 24 | SRC_ARC=`ls *.tar.*` |
---|
| 25 | |
---|
| 26 | #Version of the sourcefiles |
---|
| 27 | VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` |
---|
| 28 | |
---|
| 29 | #Directory of the sourcefiles to build (after optional unpacking) |
---|
| 30 | SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` |
---|
| 31 | |
---|
| 32 | #Architecture that the created binaries run on. |
---|
| 33 | #Use noarch for scripts. |
---|
| 34 | ARCH=`uname -m` |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | ########Build and create the pacakge. |
---|
| 38 | #Uncomment the stuff that you dont want or need |
---|
| 39 | |
---|
| 40 | #Unpack source |
---|
| 41 | #(uncomment if not needed) |
---|
| 42 | syn3_unpack $SRC_ARC || exit 1 |
---|
| 43 | |
---|
[516e1e9] | 44 | pushd $SRC_DIR |
---|
| 45 | |
---|
| 46 | #note, use github version that has cmake files that create actual makefiles, from: https://codeload.github.com/kisli/vmime/tar.gz/v0.9.2 |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | # from https://build.opensuse.org/package/view_file/server:mail:kopano/libvmime/libvmime.spec?expand=1 |
---|
| 50 | cf="-DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1" |
---|
| 51 | cmake . \ |
---|
| 52 | -DVMIME_SENDMAIL_PATH:STRING="/usr/sbin/sendmail" \ |
---|
| 53 | -DVMIME_BUILD_SAMPLES:BOOL=OFF \ |
---|
| 54 | -DVMIME_HAVE_SASL_SUPPORT:BOOL=OFF \ |
---|
| 55 | -DVMIME_HAVE_TLS_SUPPORT:BOOL=ON \ |
---|
| 56 | -DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \ |
---|
| 57 | -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \ |
---|
| 58 | -DCMAKE_INSTALL_PREFIX:PATH="/usr" \ |
---|
| 59 | -DCMAKE_CXX_FLAGS_DEBUG:STRING="-g" \ |
---|
| 60 | -DCMAKE_CXX_FLAGS:STRING="$cf -std=gnu++11" \ |
---|
| 61 | -DCMAKE_C_FLAGS:STRING="$cf" |
---|
| 62 | make -j10 VERBOSE=1 |
---|
| 63 | make install DESTDIR=/tmp/pkg |
---|
| 64 | |
---|
| 65 | popd |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | |
---|
[c5c522c] | 70 | |
---|
| 71 | |
---|
| 72 | mkdir -p /tmp/pkg/etc/postinst.d |
---|
| 73 | cp post.libvmime /tmp/pkg/etc/postinst.d |
---|
| 74 | chmod +x /tmp/pkg/etc/postinst.d/post.libvmime || exit 1 |
---|
| 75 | |
---|
| 76 | #strip bins and other stuff |
---|
| 77 | syn3_strip /tmp/pkg || exit 1 |
---|
| 78 | |
---|
| 79 | #move development stuff and create seperate development package |
---|
| 80 | syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 |
---|
| 81 | syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 |
---|
| 82 | |
---|
| 83 | #make main package |
---|
| 84 | syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1 |
---|
| 85 | |
---|
| 86 | |
---|