opie/opie.spec

Thu, 18 Oct 2012 12:53:06 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 18 Oct 2012 12:53:06 +0200
changeset 746
75275e2bcfd7
parent 484
66e25dea1e09
permissions
-rw-r--r--

Refine specification, using other PHP dependent web packages as reference.

michael@482 1 ##
michael@482 2 ## opie.spec -- OpenPKG RPM Package Specification
michael@482 3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@482 4 ##
michael@482 5 ## Permission to use, copy, modify, and distribute this software for
michael@482 6 ## any purpose with or without fee is hereby granted, provided that
michael@482 7 ## the above copyright notice and this permission notice appear in all
michael@482 8 ## copies.
michael@482 9 ##
michael@482 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@482 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@482 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@482 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@482 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@482 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@482 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@482 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@482 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@482 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@482 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@482 21 ## SUCH DAMAGE.
michael@482 22 ##
michael@482 23
michael@482 24 # package version
michael@482 25 %define V_major 2.4.1
michael@482 26 %define V_minor 1
michael@482 27
michael@482 28 # package information
michael@482 29 Name: opie
michael@482 30 Summary: One-Time Passwords In Everything (OPIE)
michael@482 31 URL: http://www.inner.net/~cmetz/opie
michael@482 32 Vendor: Craig Metz
michael@482 33 Packager: OpenPKG Foundation e.V.
michael@482 34 Distribution: OpenPKG Community
michael@482 35 Class: PLUS
michael@482 36 Group: Cryptography
michael@482 37 License: INL3
michael@482 38 Version: %{V_major}.%{V_minor}
michael@483 39 Release: 20120800
michael@482 40
michael@482 41 # list of sources
michael@482 42 Source0: http://www.inner.net/pub/opie/test/opie-%{V_major}-test%{V_minor}.tar.gz
michael@482 43 Patch0: opie.patch
michael@482 44
michael@482 45 # build information
michael@483 46 BuildPreReq: OpenPKG, openpkg >= 20100101
michael@483 47 PreReq: OpenPKG, openpkg >= 20100101
michael@482 48
michael@482 49 %description
michael@482 50 OPIE is a One Time Password (OTP) toolkit.
michael@482 51
michael@482 52 %track
michael@482 53 prog opie = {
michael@482 54 version = %{V_major}-test%{V_minor}
michael@482 55 url = http://www.inner.net/pub/opie/test/
michael@482 56 regex = opie-(__VER__)\.tar\.gz
michael@482 57 }
michael@482 58
michael@482 59 %prep
michael@482 60 %setup -q -n opie-%{V_major}-test%{V_minor}
michael@482 61 %patch -p0
michael@483 62 case "%{l_platform -t}" in
michael@483 63 *-sunos* )
michael@483 64 %{l_shtool} subst \
michael@483 65 -e 's;\(#ifndef _PATH_WTMP\)$;\1_HACK;' \
michael@483 66 libopie/logwtmp.c
michael@483 67 %{l_shtool} subst \
michael@483 68 -e 's;dirp->dd_fd;dirp->d_fd;g' \
michael@483 69 glob.c
michael@483 70 ;;
michael@483 71 esac
michael@482 72
michael@482 73 %build
michael@482 74 %{l_shtool} subst \
michael@482 75 -e 's;/etc/opiekeys;%{l_prefix}/etc/opie/opiekeys;' \
michael@482 76 Makefile.in
michael@482 77 CC="%{l_cc}" \
michael@482 78 CFLAGS="%{l_cflags -O}" \
michael@482 79 CPPFLAGS="%{l_cppflags}" \
michael@482 80 LDFLAGS="%{l_ldflags}" \
michael@482 81 ./configure \
michael@482 82 --prefix=%{l_prefix} \
michael@482 83 --enable-access-file=%{l_prefix}/etc/opie/opieaccess \
michael@484 84 --enable-insecure-override \
michael@482 85 --enable-opieauto
michael@482 86 %{l_make} %{l_mflags -O}
michael@482 87 echo "#permit 127.0.0.1 255.255.255.255" >opieaccess
michael@482 88
michael@482 89 %install
michael@482 90 %{l_shtool} mkdir -f -p -m 755 \
michael@482 91 $RPM_BUILD_ROOT%{l_prefix}/bin \
michael@482 92 $RPM_BUILD_ROOT%{l_prefix}/sbin \
michael@482 93 $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
michael@646 94 $RPM_BUILD_ROOT%{l_prefix}/man/man4 \
michael@646 95 $RPM_BUILD_ROOT%{l_prefix}/man/man5 \
michael@482 96 $RPM_BUILD_ROOT%{l_prefix}/etc/opie \
michael@482 97 $RPM_BUILD_ROOT%{l_prefix}/include \
michael@482 98 $RPM_BUILD_ROOT%{l_prefix}/lib
michael@482 99 %{l_shtool} install -c -s -m 755 \
michael@646 100 opiegen opiekey opielogin opieserv opiesu opieauto $RPM_BUILD_ROOT%{l_prefix}/bin/
michael@482 101 %{l_shtool} install -c -m 644 \
michael@646 102 opiegen.1 opiekey.1 opielogin.1 opieserv.1 opiesu.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
michael@482 103 %{l_shtool} install -c -s -m 755 \
michael@482 104 opiepasswd opieinfo $RPM_BUILD_ROOT%{l_prefix}/sbin/
michael@482 105 %{l_shtool} install -c -m 644 \
michael@646 106 opiepasswd.1 opieinfo.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
michael@482 107 %{l_shtool} install -c -m 644 \
michael@482 108 libopie/libopie.a $RPM_BUILD_ROOT%{l_prefix}/lib/
michael@482 109 %{l_shtool} install -c -m 644 \
michael@482 110 opie.h $RPM_BUILD_ROOT%{l_prefix}/include/
michael@482 111 %{l_shtool} install -c -m 644 \
michael@646 112 opie.4 $RPM_BUILD_ROOT%{l_prefix}/man/man4/
michael@482 113 %{l_shtool} install -c -m 644 \
michael@482 114 opieaccess $RPM_BUILD_ROOT%{l_prefix}/etc/opie/
michael@484 115 %{l_shtool} install -c -m 600 \
michael@484 116 /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/opie/opiekeys
michael@646 117 %{l_shtool} install -c -m 644 \
michael@646 118 opieaccess.5 opiekeys.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
michael@482 119 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@482 120 %{l_files_std} \
michael@482 121 '%config %{l_prefix}/etc/opie/*'
michael@482 122
michael@482 123 %files -f files
michael@482 124
michael@482 125 %clean
michael@482 126

mercurial