pinentry/pinentry.spec

Mon, 22 Nov 2010 12:41:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 22 Nov 2010 12:41:49 +0100
changeset 291
52571005077f
parent 282
dae915416cf4
permissions
-rw-r--r--

Backport RPM boilerplate logic required by legacy OpenPKG scripts.

michael@282 1 ##
michael@282 2 ## pinentry.spec -- OpenPKG RPM Package Specification
michael@282 3 ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@282 4 ##
michael@282 5 ## Permission to use, copy, modify, and distribute this software for
michael@282 6 ## any purpose with or without fee is hereby granted, provided that
michael@282 7 ## the above copyright notice and this permission notice appear in all
michael@282 8 ## copies.
michael@282 9 ##
michael@282 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@282 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@282 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@282 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@282 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@282 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@282 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@282 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@282 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@282 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@282 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@282 21 ## SUCH DAMAGE.
michael@282 22 ##
michael@282 23
michael@282 24 # package information
michael@282 25 Name: pinentry
michael@282 26 Summary: Interactive PIN Entry Dialogs
michael@282 27 URL: http://www.gnupg.org/related_software/pinentry/
michael@282 28 Vendor: R. Bihlmeyer, W. Koch, S. Hansen, M. Brinkmann
michael@282 29 Packager: OpenPKG Foundation e.V.
michael@282 30 Distribution: OpenPKG Community
michael@282 31 Class: PLUS
michael@282 32 Group: Terminal
michael@282 33 License: GPL
michael@282 34 Version: 0.8.0
michael@283 35 Release: 20101020
michael@282 36
michael@282 37 # package options
michael@282 38 %option with_x11 no
michael@282 39
michael@282 40 # list of sources
michael@282 41 Source0: ftp://ftp.gnupg.org/gcrypt/pinentry/pinentry-%{version}.tar.gz
michael@282 42 Patch0: pinentry.patch
michael@282 43
michael@282 44 # build information
michael@283 45 Prefix: %{l_prefix}
michael@283 46 BuildRoot: %{l_buildroot}
michael@282 47 BuildPreReq: OpenPKG, openpkg >= 20100101
michael@282 48 PreReq: OpenPKG, openpkg >= 20100101
michael@282 49 BuildPreReq: ncurses, libiconv
michael@282 50 PreReq: ncurses, libiconv
michael@282 51 %if "%{with_x11}" == "yes"
michael@282 52 BuildPreReq: gtk2
michael@282 53 PreReq: gtk2
michael@282 54 %endif
michael@282 55
michael@282 56 %description
michael@282 57 PINentry is a collection of simple PIN or passphrase entry dialogs
michael@282 58 which utilize the Assuan protocol as described by the GnuPG
michael@282 59 and Aegypten projects. It allows applications like GnuPG to
michael@282 60 interactively request PINs or passphrases.
michael@282 61
michael@282 62 %track
michael@282 63 prog pinentry = {
michael@282 64 version = %{version}
michael@282 65 url = ftp://ftp.gnupg.org/gcrypt/pinentry/
michael@282 66 regex = pinentry-(__VER__)\.tar\.gz
michael@282 67 }
michael@282 68
michael@282 69 %prep
michael@282 70 %setup -q
michael@282 71 %patch -p0
michael@282 72
michael@282 73 %build
michael@282 74 CC="%{l_cc}" \
michael@282 75 CXX="%{l_cxx}" \
michael@282 76 CFLAGS="%{l_cflags -O}" \
michael@282 77 CXXFLAGS="%{l_cxxflags -O}" \
michael@282 78 CPPFLAGS="%{l_cppflags ncurses .}" \
michael@282 79 LDFLAGS="%{l_ldflags}" \
michael@282 80 ./configure \
michael@282 81 --prefix=%{l_prefix} \
michael@282 82 --infodir=%{l_prefix}/info \
michael@282 83 --enable-pinentry-curses \
michael@282 84 --enable-fallback-curses \
michael@282 85 --with-ncurses-include-dir=%{l_prefix}/include/ncurses \
michael@282 86 %if "%{with_x11}" == "yes"
michael@282 87 --with-x \
michael@282 88 --enable-pinentry-gtk2 \
michael@282 89 %else
michael@282 90 --disable-pinentry-gtk2 \
michael@282 91 %endif
michael@282 92 --disable-pinentry-gtk \
michael@282 93 --disable-pinentry-qt \
michael@282 94 --disable-threading
michael@282 95 %{l_make} %{l_mflags -O}
michael@282 96
michael@282 97 %install
michael@283 98 rm -rf $RPM_BUILD_ROOT
michael@282 99 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
michael@282 100 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
michael@282 101 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
michael@282 102 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@282 103
michael@282 104 %files -f files
michael@282 105
michael@282 106 %clean
michael@283 107 rm -rf $RPM_BUILD_ROOT
michael@282 108

mercurial