opie/opie.spec

Mon, 06 Aug 2012 13:34:16 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 06 Aug 2012 13:34:16 +0200
changeset 482
8c83aede6fbd
child 483
fc03f72a209e
permissions
-rw-r--r--

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:      20080101
    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 Prefix:       %{l_prefix}
    47 BuildRoot:    %{l_buildroot}
    48 BuildPreReq:  OpenPKG, openpkg >= 20040130
    49 PreReq:       OpenPKG, openpkg >= 20040130
    50 AutoReq:      no
    51 AutoReqProv:  no
    53 %description
    54     OPIE is a One Time Password (OTP) toolkit.
    56 %track
    57     prog opie = {
    58         version   = %{V_major}-test%{V_minor}
    59         url       = http://www.inner.net/pub/opie/test/
    60         regex     = opie-(__VER__)\.tar\.gz
    61     }
    63 %prep
    64     %setup -q -n opie-%{V_major}-test%{V_minor}
    65     %patch -p0
    67 %build
    68     %{l_shtool} subst \
    69         -e 's;/etc/opiekeys;%{l_prefix}/etc/opie/opiekeys;' \
    70         Makefile.in
    71     CC="%{l_cc}" \
    72     CFLAGS="%{l_cflags -O}" \
    73     CPPFLAGS="%{l_cppflags}" \
    74     LDFLAGS="%{l_ldflags}" \
    75     ./configure \
    76         --prefix=%{l_prefix} \
    77         --enable-access-file=%{l_prefix}/etc/opie/opieaccess \
    78         --enable-opieauto
    79     %{l_make} %{l_mflags -O}
    80     echo "#permit 127.0.0.1 255.255.255.255" >opieaccess
    82 %install
    83     rm -rf $RPM_BUILD_ROOT
    84     %{l_shtool} mkdir -f -p -m 755 \
    85         $RPM_BUILD_ROOT%{l_prefix}/bin \
    86         $RPM_BUILD_ROOT%{l_prefix}/sbin \
    87         $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
    88         $RPM_BUILD_ROOT%{l_prefix}/man/man3 \
    89         $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
    90         $RPM_BUILD_ROOT%{l_prefix}/etc/opie \
    91         $RPM_BUILD_ROOT%{l_prefix}/include \
    92         $RPM_BUILD_ROOT%{l_prefix}/lib
    93     %{l_shtool} install -c -s -m 755 \
    94         opiekey opieauto $RPM_BUILD_ROOT%{l_prefix}/bin/
    95     %{l_shtool} install -c -m 644 \
    96         opiekey.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
    97     %{l_shtool} install -c -s -m 755 \
    98         opiepasswd opieinfo $RPM_BUILD_ROOT%{l_prefix}/sbin/
    99     %{l_shtool} install -c -m 644 \
   100         opiepasswd.1 $RPM_BUILD_ROOT%{l_prefix}/man/man8/opiepasswd.8
   101     %{l_shtool} install -c -m 644 \
   102         opieinfo.1 $RPM_BUILD_ROOT%{l_prefix}/man/man8/opieinfo.8
   103     %{l_shtool} install -c -m 644 \
   104         libopie/libopie.a $RPM_BUILD_ROOT%{l_prefix}/lib/
   105     %{l_shtool} install -c -m 644 \
   106         opie.h $RPM_BUILD_ROOT%{l_prefix}/include/
   107     %{l_shtool} install -c -m 644 \
   108         opie.4 $RPM_BUILD_ROOT%{l_prefix}/man/man3/opie.3
   109     %{l_shtool} install -c -m 644 \
   110         opieaccess $RPM_BUILD_ROOT%{l_prefix}/etc/opie/
   111     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   112         %{l_files_std} \
   113         '%config %{l_prefix}/etc/opie/*'
   115 %files -f files
   117 %clean
   118     rm -rf $RPM_BUILD_ROOT

mercurial