summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1c653e89d4adcac1ec9705550a5f305bbbae292d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Find this package on https://github.com/pietmacom/kopano-pkgbuilds.git
_pkgname='vmime'
pkgbase='vmime'
pkgname=('vmime-libonly'
         'vmime')
pkgver=0.9.2.r1270.d03ad5f0
pkgrel=1
provides=(
    'libvmime'
	 )
pkgdesc='A C++ class library for working with MIME messages'
arch=(
    'armv7l'
    'aarch64'
    'i686'
    'x86_64'
     )
url='http://www.vmime.org/'
license=(
    'GPL'
	)
_url="https://github.com/kisli/${_pkgname}"
	
conflicts=('zarafa-libvmime'
           'kopano-libvmime'
           'libvmime')

source=("git+${_url}")
sha256sums=('SKIP')
makedepends=(
    'cmake'
    'postfix'
    'doxygen'
    'xdot'
    'git'
	    )
depends=(
    'gsasl' 
    'gnutls'
	)

#pkgver() {
#  cd ${srcdir}/${pkgname}
#  printf "$_ver.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
#}

prepare() {
    cd ${srcdir}/${_pkgname}
    git checkout master
    git pull
}

build() {
    cmake \
    -B build \
    -S "${_pkgname}" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIB_INSTALL_DIR=/usr/lib/ \
    -DCMAKE_BUILD_TYPE=Release

    cmake --build build
}

package_vmime() {
    cd build
    make DESTDIR="$pkgdir" install
}

package_vmime-libonly() {
    cd build
    make DESTDIR="$pkgdir" install

    # fix for parallel installation
    rm -rf ${pkgdir}/usr/include
    rm -rf ${pkgdir}/usr/lib/libvmime.so
    rm -rf ${pkgdir}/usr/lib/pkgconfig
}