tinyows/tinyows.spec

106 lines
2.8 KiB
RPMSpec
Raw Permalink Normal View History

2024-08-25 22:41:33 +00:00
%global project_owner MapServer
%global project_name tinyows
Name: tinyows
Version: 1.2.2
2024-09-12 16:59:03 +00:00
Release: %autorelease
Summary: PostGIS WFS-T and FE implementation server
2024-08-25 22:41:33 +00:00
License: MIT
URL: https://mapserver.org/tinyows/
Source0: https://github.com/%{project_owner}/%{project_name}/archive/v%{version}/%{project_name}-%{version}.tar.gz
Source1: no_date_footer.html
Requires: httpd
BuildRequires: autoconf
BuildRequires: ctags
BuildRequires: doxygen
BuildRequires: gcc
BuildRequires: indent
BuildRequires: flex
BuildRequires: libfl-static
BuildRequires: libxml2-devel
BuildRequires: postgis
BuildRequires: postgis-client
BuildRequires: postgresql-devel
%ifarch %valgrind_arches
BuildRequires: valgrind-devel
%endif
%description
TinyOWS server implements latest Open Geospatial Consortium Transactional Web
Feature Service (WFS-T) standard versions, as well as related standards such as
Filter Encoding (FE).
2024-08-25 22:41:33 +00:00
%package doc
Summary: Documentation files for TinyOWS Server
BuildArch: noarch
%description doc
TinyOWS server implements latest Open Geospatial Consortium Transactional Web
Feature Service (WFS-T) standard versions, as well as related standards such as
Filter Encoding (FE).
2024-08-25 22:41:33 +00:00
%prep
%setup -q -n %{name}-%{version}
# clean SVN
find . -type d -name .svn -exec rm -rf '{}' +
# copy no_date_footer.html in
cp %{SOURCE1} .
%build
autoconf
%configure
# fix datadir lookup path
sed -i -e 's|/usr/tinyows/|%{_datadir}/%{name}/|' src/ows_define.h
# fix DSO lookup
sed -i -e 's|-lpq|-lpq -lm|' Makefile
2024-09-13 12:52:02 +00:00
# respect fedora ldflags
sed -i -e 's|-lfl $(POSTGIS_LIB)|-lfl $(LDFLAGS) $(POSTGIS_LIB)|' Makefile
2024-09-12 16:59:03 +00:00
%make_build
2024-08-25 22:41:33 +00:00
# disable timestamp inside docs
sed -i -e 's|HTML_FOOTER|HTML_FOOTER=no_date_footer.html\n\#|g' doc/Doxyfile
make doxygen
%install
install -d %{buildroot}%{_bindir}
install -p -m 0755 tinyows %{buildroot}%{_bindir}/
install -d %{buildroot}%{_datadir}/%{name}
cp -pR schema %{buildroot}%{_datadir}/%{name}/
install -d %{buildroot}%{_sysconfdir}/%{name}
install -p -m 0644 ms4w/apps/tinyows-svn/config.xml %{buildroot}%{_sysconfdir}/%{name}
2024-09-12 16:59:03 +00:00
ln -s --relative %{buildroot}%{_sysconfdir}/%{name}/config.xml %{buildroot}%{_datadir}/%{name}/
2024-08-25 22:41:33 +00:00
mkdir -p %{buildroot}%{_pkgdocdir}
cp -a doc/doxygen %{buildroot}%{_pkgdocdir}/
hardlink --ignore-time --reflink=never %{buildroot}%{_pkgdocdir}/
2024-09-12 16:59:03 +00:00
# NOTE(neil): 2024-08-25 tests require a postgres database running; unable to run in check
2024-08-25 22:41:33 +00:00
# https://github.com/MapServer/tinyows/blob/f1dc7bc86fc4d69faddd79ed2804d98c11802ba8/.github/workflows/linux.sh#L19-L22
2024-09-12 16:59:03 +00:00
%dnl %check
2024-08-25 22:41:33 +00:00
%files
2024-09-12 16:59:03 +00:00
%license LICENSE.md schema/LICENSE
2024-08-25 22:41:33 +00:00
%{_bindir}/%{name}
%{_datadir}/%{name}
2024-08-25 22:41:33 +00:00
%dir %{_sysconfdir}/%{name}
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/config.xml
%files doc
%doc README.md VERSION.md
%doc %{_pkgdocdir}/doxygen
2024-08-25 22:41:33 +00:00
%changelog
2024-09-12 16:59:03 +00:00
%autochangelog