Mon, 17 Sep 2012 19:10:10 +0200
Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.
michael@70 | 1 | ## |
michael@70 | 2 | ## libupnp.spec -- OpenPKG RPM Specification |
michael@632 | 3 | ## Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com> |
michael@70 | 4 | ## |
michael@70 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@70 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@70 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@70 | 8 | ## copies. |
michael@70 | 9 | ## |
michael@70 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@70 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@70 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@70 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@70 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@70 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@70 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@70 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@70 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@70 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@70 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@70 | 21 | ## SUCH DAMAGE. |
michael@70 | 22 | ## |
michael@70 | 23 | |
michael@70 | 24 | |
michael@70 | 25 | # package information |
michael@70 | 26 | Name: libupnp |
michael@70 | 27 | Summary: Universal Plug and Play (UPnP) SDK |
michael@70 | 28 | URL: http://pupnp.sourceforge.net/ |
michael@70 | 29 | Vendor: Michel Pfeiffer |
michael@70 | 30 | Packager: Michael Schloh von Bennewitz |
michael@387 | 31 | Distribution: Europalab Networks Production |
michael@70 | 32 | Class: EVAL |
michael@70 | 33 | Group: Network |
michael@70 | 34 | License: BSD |
michael@632 | 35 | Version: 1.6.17 |
michael@632 | 36 | Release: 20120800 |
michael@70 | 37 | |
michael@70 | 38 | # list of sources |
michael@70 | 39 | Source0: http://switch.dl.sourceforge.net/pupnp/libupnp-%{version}.tar.bz2 |
michael@70 | 40 | Patch0: libupnp.patch |
michael@70 | 41 | |
michael@70 | 42 | # build information |
michael@632 | 43 | BuildPreReq: OpenPKG, openpkg >= 20100101, make |
michael@632 | 44 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@70 | 45 | |
michael@70 | 46 | %description |
michael@70 | 47 | The portable Universal Plug and Play (UPnP) SDK provides support |
michael@70 | 48 | for building UPnP compliant control points, devices, and bridges |
michael@70 | 49 | that are compliant with version 1.0 of the Universal Plug and |
michael@70 | 50 | Play device architecture specification. |
michael@70 | 51 | |
michael@70 | 52 | %track |
michael@70 | 53 | prog libupnp = { |
michael@70 | 54 | version = %{version} |
michael@70 | 55 | url = http://prdownloads.sourceforge.net/upnp/ |
michael@70 | 56 | regex = libupnp-(__VER__)\.tar\.bz2 |
michael@70 | 57 | } |
michael@70 | 58 | |
michael@70 | 59 | %prep |
michael@70 | 60 | # unpack sources |
michael@70 | 61 | %setup -q |
michael@70 | 62 | %patch -p0 |
michael@70 | 63 | |
michael@70 | 64 | # apply coorections |
michael@70 | 65 | %{l_shtool} subst \ |
michael@70 | 66 | -e 's;#if defined(_sun);#if (defined(sun) \&\& defined(__svr4__));' \ |
michael@70 | 67 | upnp/src/api/upnpapi.c |
michael@70 | 68 | %{l_shtool} subst \ |
michael@70 | 69 | -e 's;defined(SPARC_SOLARIS);(defined(sun) \&\& defined(__svr4__));' \ |
michael@70 | 70 | upnp/src/genlib/net/uri/uri.c |
michael@70 | 71 | %{l_shtool} subst \ |
michael@70 | 72 | -e 's;\(uuid_create_from_name\);\1_upnp;g' \ |
michael@70 | 73 | -e 's;\(uuid_compare\);\1_upnp;g' \ |
michael@70 | 74 | -e 's;\(uuid_create\);\1_upnp;g' \ |
michael@70 | 75 | -e 's;\(uuid_unpack\);\1_upnp;g' \ |
michael@70 | 76 | upnp/src/gena/gena_device.c \ |
michael@70 | 77 | upnp/src/gena/gena_ctrlpt.c \ |
michael@70 | 78 | upnp/src/uuid/uuid.c \ |
michael@70 | 79 | upnp/src/inc/uuid.h |
michael@70 | 80 | |
michael@70 | 81 | %build |
michael@70 | 82 | # query for platform specific libraries |
michael@70 | 83 | loclibs="" |
michael@70 | 84 | case "%{l_platform -t}" in |
michael@70 | 85 | *-sunos* ) loclibs="-lsocket -lnsl -lrt" ;; |
michael@70 | 86 | esac |
michael@70 | 87 | |
michael@70 | 88 | # prepare build configuration |
michael@70 | 89 | CC="%{l_cc}" \ |
michael@70 | 90 | CFLAGS="%{l_cflags -O}" \ |
michael@70 | 91 | CPPFLAGS="%{l_cppflags}" \ |
michael@70 | 92 | LDFLAGS="%{l_ldflags}" \ |
michael@70 | 93 | LIBS="$loclibs" \ |
michael@72 | 94 | GREP=grep \ |
michael@70 | 95 | ./configure \ |
michael@70 | 96 | --prefix=%{l_prefix} \ |
michael@632 | 97 | --disable-optssdp \ |
michael@70 | 98 | --disable-shared |
michael@70 | 99 | |
michael@70 | 100 | # build using parallel make |
michael@70 | 101 | %{l_make} %{l_mflags -O} |
michael@70 | 102 | |
michael@70 | 103 | %install |
michael@70 | 104 | # run the native installation logic |
michael@70 | 105 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@70 | 106 | |
michael@70 | 107 | # install docs |
michael@70 | 108 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@78 | 109 | $RPM_BUILD_ROOT%{l_prefix}/share/libupnp/doc/pdf \ |
michael@78 | 110 | $RPM_BUILD_ROOT%{l_prefix}/share/libupnp/doc/html/ixml \ |
michael@78 | 111 | $RPM_BUILD_ROOT%{l_prefix}/share/libupnp/doc/html/upnp |
michael@70 | 112 | %{l_shtool} install -c -m 644 \ |
michael@78 | 113 | docs/dist/html/ixml/* \ |
michael@78 | 114 | $RPM_BUILD_ROOT%{l_prefix}/share/libupnp/doc/html/ixml/ |
michael@78 | 115 | %{l_shtool} install -c -m 644 \ |
michael@78 | 116 | docs/dist/html/upnp/* \ |
michael@78 | 117 | $RPM_BUILD_ROOT%{l_prefix}/share/libupnp/doc/html/upnp/ |
michael@78 | 118 | %{l_shtool} install -c -m 644 \ |
michael@78 | 119 | docs/dist/*.pdf \ |
michael@78 | 120 | $RPM_BUILD_ROOT%{l_prefix}/share/libupnp/doc/pdf/ |
michael@70 | 121 | |
michael@70 | 122 | # install examples |
michael@70 | 123 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@70 | 124 | $RPM_BUILD_ROOT%{l_prefix}/share/libupnp/examples |
michael@632 | 125 | %{l_shtool} install -c -m 755 -s \ |
michael@632 | 126 | upnp/sample/tv_combo \ |
michael@632 | 127 | upnp/sample/tv_ctrlpt \ |
michael@632 | 128 | upnp/sample/tv_device \ |
michael@70 | 129 | $RPM_BUILD_ROOT%{l_prefix}/share/libupnp/examples/ |
michael@70 | 130 | |
michael@70 | 131 | # determine installation files |
michael@78 | 132 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@78 | 133 | %{l_files_std} \ |
michael@78 | 134 | '%doc %{l_prefix}/share/libupnp/doc/html/*/*' \ |
michael@78 | 135 | '%doc %{l_prefix}/share/libupnp/doc/pdf/*' \ |
michael@77 | 136 | '%not %dir %{l_prefix}/lib/pkgconfig' |
michael@70 | 137 | |
michael@70 | 138 | %files -f files |
michael@70 | 139 | |
michael@70 | 140 | %clean |
michael@70 | 141 | |
michael@70 | 142 | %post |
michael@70 | 143 | # after installing or upgrading package networking reminder |
michael@70 | 144 | ( echo "Before using UPnP, the network must be able to multicast route." |
michael@70 | 145 | echo "The following command may add a static multicast route:" |
michael@84 | 146 | echo " # route add -net 239.0.0.0 netmask 255.0.0.0 dev eth0" |
michael@70 | 147 | ) | %{l_rpmtool} msg -b -t notice |
michael@70 | 148 | exit 0 |
michael@70 | 149 |