udns/udns.spec

Sun, 29 May 2011 16:29:06 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 29 May 2011 16:29:06 +0200
changeset 344
e33c1efbd60f
parent 221
dae77b684675
child 493
8a7a53c3985c
permissions
-rw-r--r--

Update, correct, improve build configuration and packaging logic.
Update to new version of vendor software, bump copyright date, remove implicit
gcc dependency, add comments for Trolltech bug tracking, correct enforced
dynamic library linkage, and install mysterious process stub binary.

michael@221 1 ##
michael@221 2 ## udns.spec -- OpenPKG RPM Package Specification
michael@221 3 ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@221 4 ##
michael@221 5 ## Permission to use, copy, modify, and distribute this software for
michael@221 6 ## any purpose with or without fee is hereby granted, provided that
michael@221 7 ## the above copyright notice and this permission notice appear in all
michael@221 8 ## copies.
michael@221 9 ##
michael@221 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@221 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@221 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@221 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@221 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@221 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@221 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@221 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@221 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@221 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@221 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@221 21 ## SUCH DAMAGE.
michael@221 22 ##
michael@221 23
michael@221 24 # package information
michael@221 25 Name: udns
michael@221 26 Summary: Asynchronous DNS Resolver Library
michael@221 27 URL: http://www.corpit.ru/mjt/udns.html
michael@221 28 Vendor: Michael Tokarev
michael@221 29 Packager: OpenPKG Foundation e.V.
michael@221 30 Distribution: OpenPKG Community
michael@221 31 Class: EVAL
michael@221 32 Group: DNS
michael@221 33 License: LGPL
michael@221 34 Version: 0.0.9
michael@222 35 Release: 20091026
michael@221 36
michael@221 37 # list of sources
michael@221 38 Source0: http://www.corpit.ru/mjt/udns/udns_%{version}.tar.gz
michael@221 39
michael@221 40 # build information
michael@221 41 Prefix: %{l_prefix}
michael@221 42 BuildRoot: %{l_buildroot}
michael@221 43 BuildPreReq: OpenPKG, openpkg >= 20060823
michael@221 44 PreReq: OpenPKG, openpkg >= 20060823
michael@221 45 AutoReq: no
michael@221 46 AutoReqProv: no
michael@221 47
michael@221 48 %description
michael@221 49 UDNS is a stub DNS resolver library with ability to perform both
michael@221 50 syncronous and asyncronous DNS queries.
michael@221 51
michael@221 52 %track
michael@221 53 prog udns = {
michael@221 54 version = %{version}
michael@221 55 url = http://www.corpit.ru/mjt/udns/
michael@221 56 regex = udns[_-](__VER__)\.tar\.gz
michael@221 57 }
michael@221 58
michael@221 59 %prep
michael@221 60 %setup -q
michael@222 61 %{l_shtool} subst \
michael@222 62 -e 's;\(^LIBFL[\ \t]*=.*\);\1 @LDFLAGS@;' \
michael@222 63 Makefile.in
michael@222 64 %{l_shtool} subst \
michael@222 65 -e 's;dns_ntop;inet_ntop;g' \
michael@222 66 -e 's;dns_pton;inet_pton;g' \
michael@222 67 udns_resolver.c \
michael@222 68 rblcheck.c \
michael@222 69 ex-rdns.c \
michael@222 70 dnsget.c
michael@221 71
michael@221 72 %build
michael@222 73 loclibs=''
michael@222 74 case "%{l_platform -t}" in
michael@222 75 *-sunos* )
michael@222 76 loclibs='-lsocket -lnsl'
michael@222 77 ;;
michael@222 78 esac
michael@221 79 CC="%{l_cc}" \
michael@221 80 CFLAGS="%{l_cflags -O}" \
michael@222 81 LDFLAGS="%{l_ldflags} $loclibs" \
michael@221 82 ./configure
michael@221 83 %{l_make} %{l_mflags}
michael@221 84
michael@221 85 %install
michael@221 86 rm -rf $RPM_BUILD_ROOT
michael@221 87 %{l_shtool} mkdir -f -p -m 755 \
michael@221 88 $RPM_BUILD_ROOT%{l_prefix}/include \
michael@221 89 $RPM_BUILD_ROOT%{l_prefix}/lib \
michael@221 90 $RPM_BUILD_ROOT%{l_prefix}/man/man3
michael@221 91 %{l_shtool} install -c -m 644 \
michael@221 92 udns.h $RPM_BUILD_ROOT%{l_prefix}/include/
michael@221 93 %{l_shtool} install -c -m 644 \
michael@221 94 libudns.a $RPM_BUILD_ROOT%{l_prefix}/lib/
michael@221 95 %{l_shtool} install -c -m 644 \
michael@221 96 udns.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/
michael@221 97 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@221 98
michael@221 99 %files -f files
michael@221 100
michael@221 101 %clean
michael@221 102 rm -rf $RPM_BUILD_ROOT
michael@221 103

mercurial