archrelease: copy trunk to community-any
[arch-community.git] / partimage / trunk / PKGBUILD
blobaaccaf9f41332c0c8900e46e1e71012f5f611ecc
1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Contributor: Roman Kyrylych <roman@archlinux.org>
3 # Contributor: Sven Kauber <celeon@gmail.com>
4 # Contributor: tardo <tardo@nagi-fanboi.net>
5 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
7 pkgname=partimage
8 pkgver=0.6.9
9 pkgrel=14
10 pkgdesc='Partition Image saves partitions in many formats to an image file.'
11 arch=('x86_64')
12 url='https://www.partimage.org/'
13 license=('GPL')
14 depends=('libnewt' 'bzip2' 'openssl')
15 backup=('etc/partimaged/partimagedusers')
16 source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
17         'partimage-0.6.9-zlib-1.2.6.patch'
18         'use-SSLv3-by-default.patch'
19         'partimage-build-fix.patch'
20         'partimaged-gencrt'
21         'partimaged.service'
22         'partimage.sysusers')
23 sha256sums=('753a6c81f4be18033faed365320dc540fe5e58183eaadcd7a5b69b096fec6635'
24             '9d6aa1a37647349aa70f89ab134574c1750e70c6904baa30211f965f35f42b9c'
25             '1b35697e349e5baca2a0d57d04d2a90f8dacfbf69b0bfb1d8661d9f08cead1fd'
26             'b228103401a0e62158234d7a2f69cab237624c4f352a492a6c8bf629d7e124d3'
27             '4c14d9fb10d994e04887d774e4c530ec92c99e32adf727e439ffdf6333886359'
28             '6127a866a1b54b77b5ca7616fec1bad29ec0f394b9c5edb8209fde2b4b0552fd'
29             'f8c2760fbe9bab5be0069248b53a0352bb08d399060084f67e4bb5112343623b')
31 prepare() {
32   cd "${srcdir}/${pkgname}-${pkgver}"
34   patch -Np1 -i ../partimage-0.6.9-zlib-1.2.6.patch
35   patch -Np1 -i ../use-SSLv3-by-default.patch
36   patch -p1 -i ../partimage-build-fix.patch # Fix build with recent glibc
38   sed -e 's/CRYPTO_lock/X509_new/g' -i configure
41 build() {
42   cd "${srcdir}/${pkgname}-${pkgver}"
44   ./configure \
45     --prefix=/usr \
46     --sysconfdir=/etc \
47     --sbindir=/usr/bin \
48     --enable-pam
50   make
51   make pamfile
54 package() {
55   cd "${srcdir}/${pkgname}-${pkgver}"
57   make DESTDIR="${pkgdir}" install
59   install -Dm0644 partimaged.pam "${pkgdir}/etc/pam.d/partimaged"
60   install -Dm0755 "${srcdir}/partimaged-gencrt" "${pkgdir}/usr/bin/partimaged-gencrt"
62   chmod 644 "${pkgdir}/etc/partimaged/partimagedusers"
63   chown 110:110 "${pkgdir}/etc/partimaged/partimagedusers"
65   install -Dm0644 ../partimaged.service "${pkgdir}/usr/lib/systemd/system/partimaged.service"
66   install -Dm0644 ../partimage.sysusers "${pkgdir}/usr/lib/sysusers.d/partimage.conf"