Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@221 | 1 | ## |
michael@221 | 2 | ## udns.spec -- OpenPKG RPM Package Specification |
michael@493 | 3 | ## Copyright (c) 2000-2011 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@493 | 34 | Version: 0.2 |
michael@494 | 35 | Release: 20120800 |
michael@221 | 36 | |
michael@221 | 37 | # list of sources |
michael@493 | 38 | Source0: http://www.corpit.ru/mjt/udns/udns-%{version}.tar.gz |
michael@221 | 39 | |
michael@221 | 40 | # build information |
michael@494 | 41 | BuildPreReq: OpenPKG, openpkg >= 20100101, make |
michael@494 | 42 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@221 | 43 | |
michael@221 | 44 | %description |
michael@221 | 45 | UDNS is a stub DNS resolver library with ability to perform both |
michael@221 | 46 | syncronous and asyncronous DNS queries. |
michael@221 | 47 | |
michael@221 | 48 | %track |
michael@221 | 49 | prog udns = { |
michael@221 | 50 | version = %{version} |
michael@221 | 51 | url = http://www.corpit.ru/mjt/udns/ |
michael@221 | 52 | regex = udns[_-](__VER__)\.tar\.gz |
michael@221 | 53 | } |
michael@221 | 54 | |
michael@221 | 55 | %prep |
michael@221 | 56 | %setup -q |
michael@493 | 57 | case "%{l_platform -t}" in |
michael@493 | 58 | *-sunos* ) |
michael@493 | 59 | %{l_shtool} subst \ |
michael@494 | 60 | -e 's;^\(LIBFL *= *.*\);\1 -lsocket -lnsl;' \ |
michael@493 | 61 | Makefile.in |
michael@493 | 62 | ;; |
michael@493 | 63 | esac |
michael@221 | 64 | |
michael@221 | 65 | %build |
michael@494 | 66 | loccppflags= |
michael@222 | 67 | case "%{l_platform -t}" in |
michael@494 | 68 | *-sunos* ) |
michael@494 | 69 | loccflags=-DHAVE_INET_PTON_NTOP |
michael@494 | 70 | ;; |
michael@222 | 71 | esac |
michael@221 | 72 | CC="%{l_cc}" \ |
michael@494 | 73 | CFLAGS="%{l_cflags -O} $loccflags" \ |
michael@221 | 74 | ./configure |
michael@494 | 75 | %{l_make} %{l_mflags -O} |
michael@221 | 76 | |
michael@221 | 77 | %install |
michael@221 | 78 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@221 | 79 | $RPM_BUILD_ROOT%{l_prefix}/include \ |
michael@221 | 80 | $RPM_BUILD_ROOT%{l_prefix}/lib \ |
michael@221 | 81 | $RPM_BUILD_ROOT%{l_prefix}/man/man3 |
michael@221 | 82 | %{l_shtool} install -c -m 644 \ |
michael@221 | 83 | udns.h $RPM_BUILD_ROOT%{l_prefix}/include/ |
michael@221 | 84 | %{l_shtool} install -c -m 644 \ |
michael@221 | 85 | libudns.a $RPM_BUILD_ROOT%{l_prefix}/lib/ |
michael@221 | 86 | %{l_shtool} install -c -m 644 \ |
michael@221 | 87 | udns.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/ |
michael@221 | 88 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@221 | 89 | |
michael@221 | 90 | %files -f files |
michael@221 | 91 | |
michael@221 | 92 | %clean |
michael@221 | 93 |