libassuan/libassuan.spec

Tue, 29 Mar 2011 19:46:35 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 19:46:35 +0200
changeset 333
4ecfc2416fd8
parent 277
127aa6d21f52
permissions
-rw-r--r--

Correct and introduce slightly needed logic, leading to better reliability:
Update bash(1) patch logic, correct several buildconf make location
errors, correct failed bash(1) configure invocation, enable perl(1) to
build with unpathed make(1), patch rpm(1) to correctly link with
internal libdb(3), and lastly unsuscessfully try to reorganize rpm patch
hunks.

michael@277 1 ##
michael@277 2 ## libassuan.spec -- OpenPKG RPM Package Specification
michael@277 3 ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@277 4 ##
michael@277 5 ## Permission to use, copy, modify, and distribute this software for
michael@277 6 ## any purpose with or without fee is hereby granted, provided that
michael@277 7 ## the above copyright notice and this permission notice appear in all
michael@277 8 ## copies.
michael@277 9 ##
michael@277 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@277 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@277 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@277 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@277 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@277 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@277 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@277 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@277 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@277 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@277 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@277 21 ## SUCH DAMAGE.
michael@277 22 ##
michael@277 23
michael@277 24 # package version
michael@277 25 %define V_assuan2 2.0.1
michael@277 26 %define V_assuan1 1.0.5
michael@277 27
michael@277 28 # package information
michael@277 29 Name: libassuan
michael@277 30 Summary: GnuPG IPC Library
michael@277 31 URL: http://www.gnupg.org/related_software/libassuan/
michael@277 32 Vendor: Werner Koch et al.
michael@277 33 Packager: OpenPKG Foundation e.V.
michael@277 34 Distribution: OpenPKG Community
michael@277 35 Class: PLUS
michael@277 36 Group: Libraries
michael@277 37 License: GPL/LGPL
michael@277 38 Version: %{V_assuan2}
michael@278 39 Release: 20101020
michael@277 40
michael@277 41 # list of sources
michael@277 42 Source0: ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-%{V_assuan1}.tar.bz2
michael@277 43 Source1: ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-%{V_assuan2}.tar.bz2
michael@277 44 Patch0: libassuan.patch
michael@277 45
michael@277 46 # build information
michael@278 47 Prefix: %{l_prefix}
michael@278 48 BuildRoot: %{l_buildroot}
michael@277 49 BuildPreReq: OpenPKG, openpkg >= 20100101
michael@277 50 PreReq: OpenPKG, openpkg >= 20100101
michael@277 51 BuildPreReq: pth, gpg-error
michael@277 52 PreReq: pth, gpg-error
michael@277 53
michael@277 54 %description
michael@277 55 Libassuan is the IPC library used by some GnuPG related software.
michael@277 56
michael@277 57 %track
michael@277 58 prog libassuan:libassuan1 = {
michael@277 59 version = %{V_assuan1}
michael@277 60 url = ftp://ftp.gnupg.org/gcrypt/libassuan/
michael@277 61 regex = libassuan-(1\.\d+\.\d+)\.tar\.bz2
michael@277 62 }
michael@277 63 prog libassuan:libassuan2 = {
michael@277 64 version = %{V_assuan2}
michael@277 65 url = ftp://ftp.gnupg.org/gcrypt/libassuan/
michael@277 66 regex = libassuan-(2\.\d+\.\d+)\.tar\.bz2
michael@277 67 }
michael@277 68
michael@277 69 %prep
michael@277 70 %setup -q -c
michael@277 71 %setup -q -D -a 1
michael@277 72 %patch -p0
michael@277 73
michael@277 74 %build
michael@277 75 ( cd libassuan-%{V_assuan1}
michael@277 76 CC="%{l_cc}" \
michael@277 77 CFLAGS="%{l_cflags -O}" \
michael@277 78 CPPFLAGS="%{l_cppflags pth .}" \
michael@277 79 LDFLAGS="%{l_ldflags}" \
michael@277 80 ./configure \
michael@277 81 --prefix=%{l_prefix} \
michael@277 82 --infodir=%{l_prefix}/info \
michael@277 83 --mandir=%{l_prefix}/man \
michael@277 84 --with-pth-prefix=%{l_prefix} \
michael@277 85 --disable-shared
michael@277 86 %{l_make} %{l_mflags -O}
michael@277 87 ) || exit $?
michael@277 88 ( cd libassuan-%{V_assuan2}
michael@277 89 CC="%{l_cc}" \
michael@277 90 CFLAGS="%{l_cflags -O}" \
michael@277 91 CPPFLAGS="%{l_cppflags pth .}" \
michael@277 92 LDFLAGS="%{l_ldflags}" \
michael@277 93 ./configure \
michael@277 94 --prefix=%{l_prefix} \
michael@277 95 --infodir=%{l_prefix}/info \
michael@277 96 --mandir=%{l_prefix}/man \
michael@277 97 --with-pth-prefix=%{l_prefix} \
michael@277 98 --disable-shared
michael@277 99 %{l_make} %{l_mflags -O}
michael@277 100 ) || exit $?
michael@277 101
michael@277 102 %install
michael@278 103 rm -rf $RPM_BUILD_ROOT
michael@277 104 ( cd libassuan-%{V_assuan1}
michael@277 105 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
michael@277 106 mv $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan-config \
michael@277 107 $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan1-config
michael@277 108 %{l_shtool} subst \
michael@277 109 -e 's;-lassuan;-lassuan1;g' \
michael@277 110 $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan1-config
michael@277 111 mv $RPM_BUILD_ROOT%{l_prefix}/include/assuan.h \
michael@277 112 $RPM_BUILD_ROOT%{l_prefix}/include/assuan1.h
michael@277 113 mv $RPM_BUILD_ROOT%{l_prefix}/info/assuan.info \
michael@277 114 $RPM_BUILD_ROOT%{l_prefix}/info/assuan1.info
michael@277 115 mv $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan.a \
michael@277 116 $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan1.a
michael@277 117 mv $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan-pth.a \
michael@277 118 $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan1-pth.a
michael@277 119 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan.la
michael@277 120 mv $RPM_BUILD_ROOT%{l_prefix}/share/aclocal/libassuan.m4 \
michael@277 121 $RPM_BUILD_ROOT%{l_prefix}/share/aclocal/libassuan1.m4
michael@277 122 ) || exit $?
michael@277 123 ( cd libassuan-%{V_assuan2}
michael@277 124 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
michael@277 125 ) || exit $?
michael@277 126 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
michael@277 127 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@277 128
michael@277 129 %files -f files
michael@277 130
michael@277 131 %clean
michael@278 132 rm -rf $RPM_BUILD_ROOT
michael@277 133

mercurial