aqmoney/aqmoney.spec

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
parent 26
89094e16ef70
child 607
3f80fa12b972
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

     1 ##
     2 ##  aqmoney.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_aqmoney     1.9.5
    26 %define       V_ktoblzcheck 1.19
    28 #   package information
    29 Name:         aqmoney
    30 Summary:      Homebanking Command Line Interface
    31 URL:          http://aqmoney.sourceforge.net/
    32 Vendor:       Martin Preuß
    33 Packager:     OpenPKG Foundation e.V.
    34 Distribution: OpenPKG Community
    35 Class:        EVAL
    36 Group:        Finance
    37 License:      GPL
    38 Version:      %{V_aqmoney}
    39 Release:      20090106
    41 #   list of sources
    42 Source0:      http://switch.dl.sourceforge.net/aqmoney/aqmoney2-%{V_aqmoney}.tar.gz
    43 Source1:      http://switch.dl.sourceforge.net/ktoblzcheck/ktoblzcheck-%{V_ktoblzcheck}.tar.gz
    44 Patch0:       aqmoney.patch
    46 #   build information
    47 Prefix:       %{l_prefix}
    48 BuildRoot:    %{l_buildroot}
    49 BuildPreReq:  OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_cxx = yes
    50 PreReq:       OpenPKG, openpkg >= 20040130
    51 BuildPreReq:  aqbanking
    52 PreReq:       aqbanking
    53 AutoReq:      no
    54 AutoReqProv:  no
    56 %description
    57     AqMoney is a command line interface for the AqBanking/AqHBCI and
    58     OpenHBCI libraries in order to perform financial transactions
    59     through the German HomeBanking Computer Interface (HBCI).
    61 %track
    62     prog aqmoney = {
    63         version   = %{V_aqmoney}
    64         url       = http://prdownloads.sourceforge.net/aqmoney/
    65         regex     = aqmoney2-(__VER__)\.tar\.gz
    66     }
    67     prog aqmoney:ktoblzcheck = {
    68         version   = %{V_ktoblzcheck}
    69         url       = http://prdownloads.sourceforge.net/ktoblzcheck/
    70         regex     = ktoblzcheck-(__VER__)\.tar\.gz
    71     }
    73 %prep
    74     %setup -q -c
    75     %setup -q -D -T -a 1
    76     %patch -p0 -d aqmoney2-%{V_aqmoney}
    78 %build
    79     #   build KtoBlzCheck library
    80     ( cd ktoblzcheck-%{V_ktoblzcheck}
    81       CC="%{l_cc}" \
    82       CXX="%{l_cxx}" \
    83       CFLAGS="%{l_cflags -O}" \
    84       CXXFLAGS="%{l_cxxflags -O}" \
    85       CPPFLAGS="%{l_cppflags}" \
    86       LDFLAGS="%{l_ldflags}" \
    87       ./configure \
    88           --prefix=%{l_prefix} \
    89           --disable-shared
    90       %{l_make} %{l_mflags -O}
    92       #   pre-install it and adjust for temporary usage by AqMoney build (below)
    93       %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
    94     ) || exit $?
    96     #   configure and build program
    97     ( cd aqmoney2-%{version}
    98       loclibs=''
    99       case "%{l_platform -t}" in
   100           *-linux* )
   101               loclibs='-ldl'
   102               ;;
   103       esac
   104       %{l_shtool} subst \
   105           -e 's;ktoblzcheck_datafile="";;' \
   106           configure
   107       CC="%{l_cxx}" \
   108       CXX="%{l_cxx}" \
   109       CFLAGS="%{l_cflags -O}" \
   110       CXXFLAGS="%{l_cxxflags -O}" \
   111       CPPFLAGS="%{l_cppflags}" \
   112       LDFLAGS="%{l_ldflags}" \
   113       LIBS="-lintl -liconv $loclibs" \
   114       ./configure \
   115           --prefix=%{l_prefix} \
   116           --with-openhbci-prefix=%{l_prefix} \
   117           --with-ktoblzcheck-includes=$RPM_BUILD_ROOT%{l_prefix}/include \
   118           --with-ktoblzcheck-libs=$RPM_BUILD_ROOT%{l_prefix}/lib \
   119           --with-ktoblzcheck-datafile=%{l_prefix}/share/ktoblzcheck/bankdata.txt \
   120           --disable-shared \
   121           --disable-nls
   122       %{l_make} %{l_mflags -O}
   123     ) || exit $?
   125 %install
   126     rm -rf $RPM_BUILD_ROOT
   128     #   install programs
   129     ( cd ktoblzcheck-%{V_ktoblzcheck}
   130       %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   131     ) || exit $?
   132     ( cd aqmoney2-%{version}
   133       %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   134     ) || exit $?
   136     #   workaround problems with AqHBCI plugin run-time
   137     %{l_shtool} mkdir -f -p -m 755 \
   138         $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney
   139     mv $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney2 \
   140        $RPM_BUILD_ROOT%{l_prefix}/libexec/aqmoney/aqmoney
   141     ( echo "#!/bin/sh"
   142       echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/openhbci2:/lib:/usr/lib\""
   143       echo "export LD_LIBRARY_PATH"
   144       echo "exec %{l_prefix}/libexec/aqmoney/aqmoney \${1+\"\$@\"}"
   145     ) >$RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney
   146     chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/aqmoney
   148     #   post-adjust installation
   149     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   150     mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney2.1 \
   151        $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1
   152     mv $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney2 \
   153        $RPM_BUILD_ROOT%{l_prefix}/include/aqmoney
   154     %{l_shtool} subst \
   155        -e 's;aqmoney2;aqmoney;g' \
   156        $RPM_BUILD_ROOT%{l_prefix}/man/man1/aqmoney.1
   158     #   determine installation files
   159     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   161 %files -f files
   163 %clean
   164     rm -rf $RPM_BUILD_ROOT

mercurial