#!/bin/bash #Source: https://github.com/Kopano-dev/vmime/releases #DEP:imagemagick #NEED:cmake ##DEP:boost #NEED:doxygen #DEP:gnutls #DEP:openssl #NEED:linuxdoc_tools #?BuildRequires: inkscape set -e #######Essential package info. #Change these if autodetection fails. #Name of the Syn-3 package that we are going to create NAME=`basename $0|sed 's/.SlackBuild//'` #Archive of the sourcefiles to unpack SRC_ARC=`ls *.tar.*` #Version of the sourcefiles VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g'` #Directory of the sourcefiles to build (after optional unpacking) SRC_DIR=`echo $SRC_ARC| sed 's/\.tar\..*$//g'` #Architecture that the created binaries run on. #Use noarch for scripts. ARCH=`uname -m` ########Build and create the pacakge. #Uncomment the stuff that you dont want or need #Unpack source #(uncomment if not needed) syn3_unpack $SRC_ARC || exit 1 pushd $SRC_DIR #note, use github version that has cmake files that create actual makefiles, from: https://codeload.github.com/kisli/vmime/tar.gz/v0.9.2 # from https://build.opensuse.org/package/view_file/server:mail:kopano/libvmime/libvmime.spec?expand=1 cf="-DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1" cmake . \ -DVMIME_SENDMAIL_PATH:STRING="/usr/sbin/sendmail" \ -DVMIME_BUILD_SAMPLES:BOOL=OFF \ -DVMIME_HAVE_SASL_SUPPORT:BOOL=OFF \ -DVMIME_HAVE_TLS_SUPPORT:BOOL=ON \ -DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \ -DCMAKE_INSTALL_PREFIX:PATH="/usr" \ -DCMAKE_CXX_FLAGS_DEBUG:STRING="-g" \ -DCMAKE_CXX_FLAGS:STRING="$cf -std=gnu++11" \ -DCMAKE_C_FLAGS:STRING="$cf" make -j10 VERBOSE=1 make install DESTDIR=/tmp/pkg popd mkdir -p /tmp/pkg/etc/postinst.d cp post.libvmime /tmp/pkg/etc/postinst.d chmod +x /tmp/pkg/etc/postinst.d/post.libvmime || exit 1 #strip bins and other stuff syn3_strip /tmp/pkg || exit 1 #move development stuff and create seperate development package syn3_move_dev /tmp/pkg /tmp/pkgdev || exit 1 syn3_makepkg /tmp/pkgdev $NAME""_dev $VER $ARCH || exit 1 #make main package syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1