You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
141 lines
4.7 KiB
141 lines
4.7 KiB
## |
|
## subversion-libs.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2022 OpenPKG Project <http://openpkg.org/> |
|
## |
|
## 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.14.1 |
|
%define V_opkg 1.14.1 |
|
|
|
# package information |
|
Name: subversion-libs |
|
Summary: Subversion Source Revision Control System (C Libraries) |
|
URL: http://subversion.apache.org/ |
|
Vendor: Apache Software Foundation |
|
Packager: OpenPKG Project |
|
Distribution: OpenPKG Community |
|
Class: EVAL |
|
Group: SCM |
|
License: Apache/BSD |
|
Version: %{V_opkg} |
|
Release: 20210211 |
|
|
|
# package options |
|
%option with_sasl no |
|
|
|
# list of sources |
|
Source0: http://www.apache.org/dist/subversion/subversion-%{V_dist}.tar.bz2 |
|
Patch0: subversion-libs.patch |
|
|
|
# build information |
|
BuildPreReq: OpenPKG, openpkg >= 20160101, make, libtool, sed, pkgconfig |
|
PreReq: OpenPKG, openpkg >= 20160101 |
|
BuildPreReq: openssl, zlib, libiconv, expat, serf, apr, sqlite, libutf8proc, lz4, neon |
|
PreReq: openssl, zlib, libiconv, expat, serf, apr, sqlite, libutf8proc, lz4, neon |
|
%if "%{with_sasl}" == "yes" |
|
BuildPreReq: sasl |
|
PreReq: sasl |
|
%endif |
|
|
|
%description |
|
These are the shared C libraries of Subversion. |
|
|
|
%track |
|
prog subversion-libs = { |
|
version = %{V_dist} |
|
url = http://subversion.apache.org/download/ |
|
regex = subversion-(\d+\.\d+.\d+)\.tar\.bz2 |
|
} |
|
|
|
%prep |
|
%setup -q -n subversion-%{V_dist} |
|
%patch -p0 |
|
|
|
# patch: adjust path to configuration directory |
|
%{l_shtool} subst \ |
|
-e 's;/etc/subversion;%{l_prefix}/etc/subversion;g' \ |
|
subversion/libsvn_subr/config_impl.h \ |
|
subversion/libsvn_subr/config_file.c |
|
|
|
%build |
|
# configure package |
|
CC="%{l_cc}" \ |
|
CFLAGS="%{l_cflags -O} -pthread" \ |
|
CPPFLAGS="%{l_cppflags libxml2 .} -DSQLITE_THREADSAFE=1" \ |
|
%if "%{with_sasl}" == "yes" |
|
LDFLAGS="%{l_ldflags} `pkg-config sasl --libs-only-L` -pthread" \ |
|
LIBS="`pkg-config sasl --libs-only-l` `pkg-config apr-util-1 --libs-only-l` -lz %{l_fsl_libs} -lneon -lssl -lcrypto" \ |
|
%else |
|
LDFLAGS="%{l_ldflags} -pthread" \ |
|
LIBS="`pkg-config apr-util-1 --libs-only-l` -lz %{l_fsl_libs} -lneon -lssl -lcrypto" \ |
|
%endif |
|
CONFIG_SHELL="%{l_bash}" \ |
|
./configure \ |
|
--prefix=%{l_prefix} \ |
|
--libdir=%{l_prefix}/lib \ |
|
--mandir=%{l_prefix}/man \ |
|
--without-berkeley-db \ |
|
--with-sqlite=%{l_prefix} \ |
|
--with-zlib=%{l_prefix} \ |
|
--with-apr=%{l_prefix} \ |
|
--with-apr-util=%{l_prefix} \ |
|
--with-serf=%{l_prefix} \ |
|
%if "%{with_sasl}" == "yes" |
|
--with-sasl \ |
|
%else |
|
--without-sasl \ |
|
%endif |
|
--without-apxs \ |
|
--disable-mod-activation \ |
|
--disable-nls \ |
|
--enable-shared \ |
|
--disable-static |
|
|
|
# build package |
|
%{l_make} %{l_mflags} |
|
|
|
%install |
|
# install package |
|
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
|
|
|
# post-adjust installation |
|
mv $RPM_BUILD_ROOT%{l_prefix}/include/subversion-1 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/include/subversion |
|
mv $RPM_BUILD_ROOT%{l_prefix}/share/pkgconfig \ |
|
$RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig |
|
|
|
# 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}/libexec |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/subversion/*.exp |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/include/subversion/svn-revision.txt |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/include/subversion/mod_dav_svn.h |
|
|
|
# determine installation files |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
|
|
|