| 30 Distribution: OpenPKG Community |
30 Distribution: OpenPKG Community |
| 31 Class: EVAL |
31 Class: EVAL |
| 32 Group: DNS |
32 Group: DNS |
| 33 License: LGPL |
33 License: LGPL |
| 34 Version: 0.2 |
34 Version: 0.2 |
| 35 Release: 20120208 |
35 Release: 20120800 |
| 36 |
36 |
| 37 # list of sources |
37 # list of sources |
| 38 Source0: http://www.corpit.ru/mjt/udns/udns-%{version}.tar.gz |
38 Source0: http://www.corpit.ru/mjt/udns/udns-%{version}.tar.gz |
| 39 |
39 |
| 40 # build information |
40 # build information |
| 41 Prefix: %{l_prefix} |
41 BuildPreReq: OpenPKG, openpkg >= 20100101, make |
| 42 BuildRoot: %{l_buildroot} |
42 PreReq: OpenPKG, openpkg >= 20100101 |
| 43 BuildPreReq: OpenPKG, openpkg >= 20060823 |
|
| 44 PreReq: OpenPKG, openpkg >= 20060823 |
|
| 45 AutoReq: no |
|
| 46 AutoReqProv: no |
|
| 47 |
43 |
| 48 %description |
44 %description |
| 49 UDNS is a stub DNS resolver library with ability to perform both |
45 UDNS is a stub DNS resolver library with ability to perform both |
| 50 syncronous and asyncronous DNS queries. |
46 syncronous and asyncronous DNS queries. |
| 51 |
47 |
| 59 %prep |
55 %prep |
| 60 %setup -q |
56 %setup -q |
| 61 case "%{l_platform -t}" in |
57 case "%{l_platform -t}" in |
| 62 *-sunos* ) |
58 *-sunos* ) |
| 63 %{l_shtool} subst \ |
59 %{l_shtool} subst \ |
| 64 -e 's;\(\$(LIBFL)\);\1 -lsocket -lnsl;g' \ |
60 -e 's;^\(LIBFL *= *.*\);\1 -lsocket -lnsl;' \ |
| 65 Makefile.in |
61 Makefile.in |
| 66 ;; |
62 ;; |
| 67 esac |
63 esac |
| 68 |
64 |
| 69 %build |
65 %build |
| |
66 loccppflags= |
| 70 case "%{l_platform -t}" in |
67 case "%{l_platform -t}" in |
| 71 *-sunos* ) loclibs='-lsocket -lnsl' ;; |
68 *-sunos* ) |
| |
69 loccflags=-DHAVE_INET_PTON_NTOP |
| |
70 ;; |
| 72 esac |
71 esac |
| 73 CC="%{l_cc}" \ |
72 CC="%{l_cc}" \ |
| 74 CFLAGS="%{l_cflags -O}" \ |
73 CFLAGS="%{l_cflags -O} $loccflags" \ |
| 75 LIBS="$loclibs" \ |
|
| 76 ./configure |
74 ./configure |
| 77 %{l_make} %{l_mflags} |
75 %{l_make} %{l_mflags -O} |
| 78 |
76 |
| 79 %install |
77 %install |
| 80 rm -rf $RPM_BUILD_ROOT |
|
| 81 %{l_shtool} mkdir -f -p -m 755 \ |
78 %{l_shtool} mkdir -f -p -m 755 \ |
| 82 $RPM_BUILD_ROOT%{l_prefix}/include \ |
79 $RPM_BUILD_ROOT%{l_prefix}/include \ |
| 83 $RPM_BUILD_ROOT%{l_prefix}/lib \ |
80 $RPM_BUILD_ROOT%{l_prefix}/lib \ |
| 84 $RPM_BUILD_ROOT%{l_prefix}/man/man3 |
81 $RPM_BUILD_ROOT%{l_prefix}/man/man3 |
| 85 %{l_shtool} install -c -m 644 \ |
82 %{l_shtool} install -c -m 644 \ |