libassuan/libassuan.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 476
184f388d7241
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 ##
     2 ##  libassuan.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2012 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_assuan2  2.0.3
    26 %define       V_assuan1  1.0.5
    28 #   package information
    29 Name:         libassuan
    30 Summary:      GnuPG IPC Library
    31 URL:          http://www.gnupg.org/related_software/libassuan/
    32 Vendor:       Werner Koch et al.
    33 Packager:     OpenPKG Foundation e.V.
    34 Distribution: OpenPKG Community
    35 Class:        PLUS
    36 Group:        Libraries
    37 License:      GPL/LGPL
    38 Version:      %{V_assuan2}
    39 Release:      20120800
    41 #   list of sources
    42 Source0:      ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-%{V_assuan1}.tar.bz2
    43 Source1:      ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-%{V_assuan2}.tar.bz2
    44 Patch0:       libassuan.patch
    46 #   build information
    47 BuildPreReq:  OpenPKG, openpkg >= 20100101
    48 PreReq:       OpenPKG, openpkg >= 20100101
    49 BuildPreReq:  pth, gpg-error
    50 PreReq:       pth, gpg-error
    52 %description
    53     Libassuan is the IPC library used by some GnuPG related software.
    55 %track
    56     prog libassuan:libassuan1 = {
    57         version   = %{V_assuan1}
    58         url       = ftp://ftp.gnupg.org/gcrypt/libassuan/
    59         regex     = libassuan-(1\.\d+\.\d+)\.tar\.bz2
    60     }
    61     prog libassuan:libassuan2 = {
    62         version   = %{V_assuan2}
    63         url       = ftp://ftp.gnupg.org/gcrypt/libassuan/
    64         regex     = libassuan-(2\.\d+\.\d+)\.tar\.bz2
    65     }
    67 %prep
    68     %setup -q -c -n libassuan-%{V_assuan2}
    69     %setup -q -T -D -a 1
    70     %patch -p0
    72 %build
    73     ( cd libassuan-%{V_assuan1}
    74       CC="%{l_cc}" \
    75       CFLAGS="%{l_cflags -O}" \
    76       CPPFLAGS="%{l_cppflags pth .}" \
    77       LDFLAGS="%{l_ldflags}" \
    78       ./configure \
    79           --prefix=%{l_prefix} \
    80           --infodir=%{l_prefix}/info \
    81           --mandir=%{l_prefix}/man \
    82           --with-pth-prefix=%{l_prefix} \
    83           --disable-shared
    84       %{l_make} %{l_mflags -O}
    85     ) || exit $?
    86     ( cd libassuan-%{V_assuan2}
    87       CC="%{l_cc}" \
    88       CFLAGS="%{l_cflags -O}" \
    89       CPPFLAGS="%{l_cppflags pth .}" \
    90       LDFLAGS="%{l_ldflags}" \
    91       ./configure \
    92           --prefix=%{l_prefix} \
    93           --infodir=%{l_prefix}/info \
    94           --mandir=%{l_prefix}/man \
    95           --with-pth-prefix=%{l_prefix} \
    96           --disable-shared
    97       %{l_make} %{l_mflags -O}
    98     ) || exit $?
   100 %install
   101     ( cd libassuan-%{V_assuan1}
   102       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   103       mv  $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan-config \
   104           $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan1-config
   105       %{l_shtool} subst \
   106           -e 's;-lassuan;-lassuan1;g' \
   107           $RPM_BUILD_ROOT%{l_prefix}/bin/libassuan1-config
   108       mv  $RPM_BUILD_ROOT%{l_prefix}/include/assuan.h \
   109           $RPM_BUILD_ROOT%{l_prefix}/include/assuan1.h
   110       mv  $RPM_BUILD_ROOT%{l_prefix}/info/assuan.info \
   111           $RPM_BUILD_ROOT%{l_prefix}/info/assuan1.info
   112       mv  $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan.a \
   113           $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan1.a
   114       mv  $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan-pth.a \
   115           $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan1-pth.a
   116       rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libassuan.la
   117       mv  $RPM_BUILD_ROOT%{l_prefix}/share/aclocal/libassuan.m4 \
   118           $RPM_BUILD_ROOT%{l_prefix}/share/aclocal/libassuan1.m4
   119     ) || exit $?
   120     ( cd libassuan-%{V_assuan2}
   121       %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   122     ) || exit $?
   123     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   124     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   126 %files -f files
   128 %clean

mercurial