## ## subversion-python.spec -- OpenPKG RPM Package Specification ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # package version %define V_dist 1.6.13 %define V_opkg 1.6.13 # package information Name: subversion-python Summary: Subversion Source Revision Control System (Python Bindings) URL: http://subversion.apache.org/ Vendor: Apache Software Foundation Packager: OpenPKG Foundation e.V. Distribution: OpenPKG Community Class: EVAL Group: SCM License: Apache/BSD Version: %{V_opkg} Release: 20101002 # list of sources Source0: http://subversion.tigris.org/downloads/subversion-%{V_dist}.tar.bz2 Source1: http://subversion.tigris.org/downloads/subversion-deps-%{V_dist}.tar.bz2 Patch0: subversion-python.patch # build information BuildPreReq: OpenPKG, openpkg >= 20100101, make, swig PreReq: OpenPKG, openpkg >= 20100101 BuildPreReq: libiconv, expat PreReq: libiconv, expat BuildPreReq: python PreReq: python %description This is the Subversion Python language bindings. %track prog subversion-python = { version = %{V_dist} url = http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260 regex = subversion-(\d+\.\d+.\d+)\.tar\.bz2 } %prep %setup -q -n subversion-%{V_dist} %setup -q -n subversion-%{V_dist} -T -D -b 1 %patch -p0 # patch: force APR to use own UUID generator to avoid conflicts between OS and OSSP uuid %{l_shtool} subst \ -e 's;osuuid="1";osuuid="0";' \ apr/configure %build # configure package CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags} -DSQLITE_THREADSAFE=1" \ LDFLAGS="%{l_ldflags}" \ CONFIG_SHELL="%{l_bash}" \ ./configure \ --prefix=%{l_prefix} \ --libdir=%{l_prefix}/lib/subversion-python \ --mandir=%{l_prefix}/man \ --without-berkeley-db \ --with-sqlite="`pwd`/sqlite-amalgamation/sqlite3.c" \ --without-ssl \ --without-libxml2 \ --without-sasl \ --without-gssapi \ --without-serf \ --without-apxs \ --with-swig=%{l_prefix}/bin/swig \ --with-python=%{l_prefix}/bin/python \ --disable-nls \ --disable-threads \ --enable-shared \ --disable-static # build package %{l_make} %{l_mflags} # build Python bindings %{l_make} %{l_mflags} swig-py %install # install package %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # install Python bindings %{l_make} %{l_mflags} install-swig-py DESTDIR=$RPM_BUILD_ROOT %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/lib/python/site-packages mv $RPM_BUILD_ROOT%{l_prefix}/lib/subversion-python/svn-python/* \ $RPM_BUILD_ROOT%{l_prefix}/lib/python/site-packages/ rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/subversion-python/svn-python # strip down installation rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin rm -rf $RPM_BUILD_ROOT%{l_prefix}/share rm -rf $RPM_BUILD_ROOT%{l_prefix}/man rm -rf $RPM_BUILD_ROOT%{l_prefix}/build-1 rm -rf $RPM_BUILD_ROOT%{l_prefix}/include rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/subversion-python/pkgconfig # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} %files -f files %clean