Mon, 06 Aug 2012 13:35:02 +0200
Port ISO C to Solaris 11, accommodating new path and glob definitions.
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-opieauto
85 %{l_make} %{l_mflags -O}
86 echo "#permit 127.0.0.1 255.255.255.255" >opieaccess
88 %install
89 %{l_shtool} mkdir -f -p -m 755 \
90 $RPM_BUILD_ROOT%{l_prefix}/bin \
91 $RPM_BUILD_ROOT%{l_prefix}/sbin \
92 $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
93 $RPM_BUILD_ROOT%{l_prefix}/man/man3 \
94 $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
95 $RPM_BUILD_ROOT%{l_prefix}/etc/opie \
96 $RPM_BUILD_ROOT%{l_prefix}/include \
97 $RPM_BUILD_ROOT%{l_prefix}/lib
98 %{l_shtool} install -c -s -m 755 \
99 opiekey opieauto $RPM_BUILD_ROOT%{l_prefix}/bin/
100 %{l_shtool} install -c -m 644 \
101 opiekey.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
102 %{l_shtool} install -c -s -m 755 \
103 opiepasswd opieinfo $RPM_BUILD_ROOT%{l_prefix}/sbin/
104 %{l_shtool} install -c -m 644 \
105 opiepasswd.1 $RPM_BUILD_ROOT%{l_prefix}/man/man8/opiepasswd.8
106 %{l_shtool} install -c -m 644 \
107 opieinfo.1 $RPM_BUILD_ROOT%{l_prefix}/man/man8/opieinfo.8
108 %{l_shtool} install -c -m 644 \
109 libopie/libopie.a $RPM_BUILD_ROOT%{l_prefix}/lib/
110 %{l_shtool} install -c -m 644 \
111 opie.h $RPM_BUILD_ROOT%{l_prefix}/include/
112 %{l_shtool} install -c -m 644 \
113 opie.4 $RPM_BUILD_ROOT%{l_prefix}/man/man3/opie.3
114 %{l_shtool} install -c -m 644 \
115 opieaccess $RPM_BUILD_ROOT%{l_prefix}/etc/opie/
116 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
117 %{l_files_std} \
118 '%config %{l_prefix}/etc/opie/*'
120 %files -f files
122 %clean