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