michael@221: ## michael@221: ## udns.spec -- OpenPKG RPM Package Specification michael@493: ## Copyright (c) 2000-2011 OpenPKG Foundation e.V. michael@221: ## michael@221: ## Permission to use, copy, modify, and distribute this software for michael@221: ## any purpose with or without fee is hereby granted, provided that michael@221: ## the above copyright notice and this permission notice appear in all michael@221: ## copies. michael@221: ## michael@221: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@221: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@221: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@221: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@221: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@221: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@221: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@221: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@221: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@221: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@221: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@221: ## SUCH DAMAGE. michael@221: ## michael@221: michael@221: # package information michael@221: Name: udns michael@221: Summary: Asynchronous DNS Resolver Library michael@221: URL: http://www.corpit.ru/mjt/udns.html michael@221: Vendor: Michael Tokarev michael@221: Packager: OpenPKG Foundation e.V. michael@221: Distribution: OpenPKG Community michael@221: Class: EVAL michael@221: Group: DNS michael@221: License: LGPL michael@493: Version: 0.2 michael@494: Release: 20120800 michael@221: michael@221: # list of sources michael@493: Source0: http://www.corpit.ru/mjt/udns/udns-%{version}.tar.gz michael@221: michael@221: # build information michael@494: BuildPreReq: OpenPKG, openpkg >= 20100101, make michael@494: PreReq: OpenPKG, openpkg >= 20100101 michael@221: michael@221: %description michael@221: UDNS is a stub DNS resolver library with ability to perform both michael@221: syncronous and asyncronous DNS queries. michael@221: michael@221: %track michael@221: prog udns = { michael@221: version = %{version} michael@221: url = http://www.corpit.ru/mjt/udns/ michael@221: regex = udns[_-](__VER__)\.tar\.gz michael@221: } michael@221: michael@221: %prep michael@221: %setup -q michael@493: case "%{l_platform -t}" in michael@493: *-sunos* ) michael@493: %{l_shtool} subst \ michael@494: -e 's;^\(LIBFL *= *.*\);\1 -lsocket -lnsl;' \ michael@493: Makefile.in michael@493: ;; michael@493: esac michael@221: michael@221: %build michael@494: loccppflags= michael@222: case "%{l_platform -t}" in michael@494: *-sunos* ) michael@494: loccflags=-DHAVE_INET_PTON_NTOP michael@494: ;; michael@222: esac michael@221: CC="%{l_cc}" \ michael@494: CFLAGS="%{l_cflags -O} $loccflags" \ michael@221: ./configure michael@494: %{l_make} %{l_mflags -O} michael@221: michael@221: %install michael@221: %{l_shtool} mkdir -f -p -m 755 \ michael@221: $RPM_BUILD_ROOT%{l_prefix}/include \ michael@221: $RPM_BUILD_ROOT%{l_prefix}/lib \ michael@221: $RPM_BUILD_ROOT%{l_prefix}/man/man3 michael@221: %{l_shtool} install -c -m 644 \ michael@221: udns.h $RPM_BUILD_ROOT%{l_prefix}/include/ michael@221: %{l_shtool} install -c -m 644 \ michael@221: libudns.a $RPM_BUILD_ROOT%{l_prefix}/lib/ michael@221: %{l_shtool} install -c -m 644 \ michael@221: udns.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/ michael@221: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@221: michael@221: %files -f files michael@221: michael@221: %clean michael@221: