michael@482: ## michael@482: ## opie.spec -- OpenPKG RPM Package Specification michael@482: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. michael@482: ## michael@482: ## Permission to use, copy, modify, and distribute this software for michael@482: ## any purpose with or without fee is hereby granted, provided that michael@482: ## the above copyright notice and this permission notice appear in all michael@482: ## copies. michael@482: ## michael@482: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@482: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@482: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@482: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@482: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@482: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@482: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@482: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@482: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@482: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@482: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@482: ## SUCH DAMAGE. michael@482: ## michael@482: michael@482: # package version michael@482: %define V_major 2.4.1 michael@482: %define V_minor 1 michael@482: michael@482: # package information michael@482: Name: opie michael@482: Summary: One-Time Passwords In Everything (OPIE) michael@482: URL: http://www.inner.net/~cmetz/opie michael@482: Vendor: Craig Metz michael@482: Packager: OpenPKG Foundation e.V. michael@482: Distribution: OpenPKG Community michael@482: Class: PLUS michael@482: Group: Cryptography michael@482: License: INL3 michael@482: Version: %{V_major}.%{V_minor} michael@483: Release: 20120800 michael@482: michael@482: # list of sources michael@482: Source0: http://www.inner.net/pub/opie/test/opie-%{V_major}-test%{V_minor}.tar.gz michael@482: Patch0: opie.patch michael@482: michael@482: # build information michael@483: BuildPreReq: OpenPKG, openpkg >= 20100101 michael@483: PreReq: OpenPKG, openpkg >= 20100101 michael@482: michael@482: %description michael@482: OPIE is a One Time Password (OTP) toolkit. michael@482: michael@482: %track michael@482: prog opie = { michael@482: version = %{V_major}-test%{V_minor} michael@482: url = http://www.inner.net/pub/opie/test/ michael@482: regex = opie-(__VER__)\.tar\.gz michael@482: } michael@482: michael@482: %prep michael@482: %setup -q -n opie-%{V_major}-test%{V_minor} michael@482: %patch -p0 michael@483: case "%{l_platform -t}" in michael@483: *-sunos* ) michael@483: %{l_shtool} subst \ michael@483: -e 's;\(#ifndef _PATH_WTMP\)$;\1_HACK;' \ michael@483: libopie/logwtmp.c michael@483: %{l_shtool} subst \ michael@483: -e 's;dirp->dd_fd;dirp->d_fd;g' \ michael@483: glob.c michael@483: ;; michael@483: esac michael@482: michael@482: %build michael@482: %{l_shtool} subst \ michael@482: -e 's;/etc/opiekeys;%{l_prefix}/etc/opie/opiekeys;' \ michael@482: Makefile.in michael@482: CC="%{l_cc}" \ michael@482: CFLAGS="%{l_cflags -O}" \ michael@482: CPPFLAGS="%{l_cppflags}" \ michael@482: LDFLAGS="%{l_ldflags}" \ michael@482: ./configure \ michael@482: --prefix=%{l_prefix} \ michael@482: --enable-access-file=%{l_prefix}/etc/opie/opieaccess \ michael@484: --enable-insecure-override \ michael@482: --enable-opieauto michael@482: %{l_make} %{l_mflags -O} michael@482: echo "#permit 127.0.0.1 255.255.255.255" >opieaccess michael@482: michael@482: %install michael@482: %{l_shtool} mkdir -f -p -m 755 \ michael@482: $RPM_BUILD_ROOT%{l_prefix}/bin \ michael@482: $RPM_BUILD_ROOT%{l_prefix}/sbin \ michael@482: $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ michael@482: $RPM_BUILD_ROOT%{l_prefix}/man/man3 \ michael@482: $RPM_BUILD_ROOT%{l_prefix}/man/man8 \ michael@482: $RPM_BUILD_ROOT%{l_prefix}/etc/opie \ michael@482: $RPM_BUILD_ROOT%{l_prefix}/include \ michael@482: $RPM_BUILD_ROOT%{l_prefix}/lib michael@482: %{l_shtool} install -c -s -m 755 \ michael@482: opiekey opieauto $RPM_BUILD_ROOT%{l_prefix}/bin/ michael@482: %{l_shtool} install -c -m 644 \ michael@482: opiekey.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ michael@482: %{l_shtool} install -c -s -m 755 \ michael@482: opiepasswd opieinfo $RPM_BUILD_ROOT%{l_prefix}/sbin/ michael@482: %{l_shtool} install -c -m 644 \ michael@482: opiepasswd.1 $RPM_BUILD_ROOT%{l_prefix}/man/man8/opiepasswd.8 michael@482: %{l_shtool} install -c -m 644 \ michael@482: opieinfo.1 $RPM_BUILD_ROOT%{l_prefix}/man/man8/opieinfo.8 michael@482: %{l_shtool} install -c -m 644 \ michael@482: libopie/libopie.a $RPM_BUILD_ROOT%{l_prefix}/lib/ michael@482: %{l_shtool} install -c -m 644 \ michael@482: opie.h $RPM_BUILD_ROOT%{l_prefix}/include/ michael@482: %{l_shtool} install -c -m 644 \ michael@482: opie.4 $RPM_BUILD_ROOT%{l_prefix}/man/man3/opie.3 michael@482: %{l_shtool} install -c -m 644 \ michael@482: opieaccess $RPM_BUILD_ROOT%{l_prefix}/etc/opie/ michael@484: %{l_shtool} install -c -m 600 \ michael@484: /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/opie/opiekeys michael@482: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@482: %{l_files_std} \ michael@482: '%config %{l_prefix}/etc/opie/*' michael@482: michael@482: %files -f files michael@482: michael@482: %clean michael@482: