Name: pazpar2
Version: @VERSION@
Release: 1
-License: BSD
+License: GPL
Group: Applications/Internet
Vendor: Index Data ApS <info@indexdata.dk>
Source: pazpar2-%{version}.tar.gz
model-independent metasearching middleware featuring merging, relevance
ranking, record sorting, and faceted results.
-%package -n pazpar2
Summary: pazpar2 daemon
-Group: Applications/Internet
Requires: libyaz4
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%package -n pazpar2-js
+Summary: pazpar2 JS
+Group: Data
+Requires: pazpar2
+
%description -n pazpar2-js
This package includes the Java Script library pz2.js. It also adds an
Alias for Apache2 so that this library and other demo portals are
available.
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%package -n pazpar2-doc
+Summary: pazpar2 documentation
+Group: Data
+
+%description -n pazpar2-doc
+This package includes documentation for Pazpar2 - the metasearcher.
%prep
%setup
rm -fr ${RPM_BUILD_ROOT}
make prefix=${RPM_BUILD_ROOT}/%{_prefix} mandir=${RPM_BUILD_ROOT}/%{_mandir} \
libdir=${RPM_BUILD_ROOT}/%{_libdir} install
-rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
+mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2
+mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/settings
+mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/services-enabled
+mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/services-available
+cp etc/server.xml ${RPM_BUILD_ROOT}/etc/pazpar2/
+cp etc/default.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
+cp etc/services/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
+cp etc/settings/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/settings/
+cp etc/*.xsl ${RPM_BUILD_ROOT}/etc/pazpar2/
%clean
rm -fr ${RPM_BUILD_ROOT}
%defattr(-,root,root)
%doc README LICENSE NEWS
%{_sbindir}/pazpar2
-%{_etcdir}/pazpar2
+%dir %{_sysconfdir}/pazpar2
+%dir %{_sysconfdir}/pazpar2/settings
+%dir %{_sysconfdir}/pazpar2/services-enabled
+%dir %{_sysconfdir}/pazpar2/services-available
+%config %{_sysconfdir}/pazpar2/*.xml
+%config %{_sysconfdir}/pazpar2/*.xsl
+%config %{_sysconfdir}/pazpar2/settings/*.xml
+%config %{_sysconfdir}/pazpar2/services-available/*.xml
%{_mandir}/man5/pazpar2*
%{_mandir}/man7/pazpar2*
%{_mandir}/man8/pazpar2*
%files -n pazpar2-js
%defattr(-,root,root)
-%{_datadir}/js/pz2.js
+%{_datadir}/pazpar2/js/pz2.js
+
+%files -n pazpar2-doc
+%defattr(-,root,root)
+%{_defaultdocdir}/pazpar2