libassuan/libassuan.spec

Fri, 22 Oct 2010 19:46:47 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 22 Oct 2010 19:46:47 +0200
changeset 277
127aa6d21f52
child 278
5a44453a73d0
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

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@277 39 Release: 20100810
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@277 47 BuildPreReq: OpenPKG, openpkg >= 20100101
michael@277 48 PreReq: OpenPKG, openpkg >= 20100101
michael@277 49 BuildPreReq: pth, gpg-error
michael@277 50 PreReq: pth, gpg-error
michael@277 51
michael@277 52 %description
michael@277 53 Libassuan is the IPC library used by some GnuPG related software.
michael@277 54
michael@277 55 %track
michael@277 56 prog libassuan:libassuan1 = {
michael@277 57 version = %{V_assuan1}
michael@277 58 url = ftp://ftp.gnupg.org/gcrypt/libassuan/
michael@277 59 regex = libassuan-(1\.\d+\.\d+)\.tar\.bz2
michael@277 60 }
michael@277 61 prog libassuan:libassuan2 = {
michael@277 62 version = %{V_assuan2}
michael@277 63 url = ftp://ftp.gnupg.org/gcrypt/libassuan/
michael@277 64 regex = libassuan-(2\.\d+\.\d+)\.tar\.bz2
michael@277 65 }
michael@277 66
michael@277 67 %prep
michael@277 68 %setup -q -c
michael@277 69 %setup -q -D -a 1
michael@277 70 %patch -p0
michael@277 71
michael@277 72 %build
michael@277 73 ( cd libassuan-%{V_assuan1}
michael@277 74 CC="%{l_cc}" \
michael@277 75 CFLAGS="%{l_cflags -O}" \
michael@277 76 CPPFLAGS="%{l_cppflags pth .}" \
michael@277 77 LDFLAGS="%{l_ldflags}" \
michael@277 78 ./configure \
michael@277 79 --prefix=%{l_prefix} \
michael@277 80 --infodir=%{l_prefix}/info \
michael@277 81 --mandir=%{l_prefix}/man \
michael@277 82 --with-pth-prefix=%{l_prefix} \
michael@277 83 --disable-shared
michael@277 84 %{l_make} %{l_mflags -O}
michael@277 85 ) || exit $?
michael@277 86 ( cd libassuan-%{V_assuan2}
michael@277 87 CC="%{l_cc}" \
michael@277 88 CFLAGS="%{l_cflags -O}" \
michael@277 89 CPPFLAGS="%{l_cppflags pth .}" \
michael@277 90 LDFLAGS="%{l_ldflags}" \
michael@277 91 ./configure \
michael@277 92 --prefix=%{l_prefix} \
michael@277 93 --infodir=%{l_prefix}/info \
michael@277 94 --mandir=%{l_prefix}/man \
michael@277 95 --with-pth-prefix=%{l_prefix} \
michael@277 96 --disable-shared
michael@277 97 %{l_make} %{l_mflags -O}
michael@277 98 ) || exit $?
michael@277 99
michael@277 100 %install
michael@277 101 ( cd libassuan-%{V_assuan1}
michael@277 102 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
michael@277 103 mv $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan-config \
michael@277 104 $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan1-config
michael@277 105 %{l_shtool} subst \
michael@277 106 -e 's;-lassuan;-lassuan1;g' \
michael@277 107 $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan1-config
michael@277 108 mv $RPM_BUILD_ROOT%{l_prefix}/include/assuan.h \
michael@277 109 $RPM_BUILD_ROOT%{l_prefix}/include/assuan1.h
michael@277 110 mv $RPM_BUILD_ROOT%{l_prefix}/info/assuan.info \
michael@277 111 $RPM_BUILD_ROOT%{l_prefix}/info/assuan1.info
michael@277 112 mv $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan.a \
michael@277 113 $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan1.a
michael@277 114 mv $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan-pth.a \
michael@277 115 $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan1-pth.a
michael@277 116 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan.la
michael@277 117 mv $RPM_BUILD_ROOT%{l_prefix}/share/aclocal/libassuan.m4 \
michael@277 118 $RPM_BUILD_ROOT%{l_prefix}/share/aclocal/libassuan1.m4
michael@277 119 ) || exit $?
michael@277 120 ( cd libassuan-%{V_assuan2}
michael@277 121 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
michael@277 122 ) || exit $?
michael@277 123 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
michael@277 124 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@277 125
michael@277 126 %files -f files
michael@277 127
michael@277 128 %clean
michael@277 129

mercurial