From 3592f87a905df726b2d30a4536bd6d3bd22a7df0 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 23 Dec 2010 11:25:30 +0100 Subject: [PATCH] pazpar2.spec.in -> pazpar2.spec --- .gitignore | 3 +- configure.ac | 1 - pazpar2.spec | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ pazpar2.spec.in | 119 ------------------------------------------------------- 4 files changed, 120 insertions(+), 122 deletions(-) create mode 100644 pazpar2.spec delete mode 100644 pazpar2.spec.in diff --git a/.gitignore b/.gitignore index d91329e..c54152a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ aclocal.m4 ChangeLog autom4te.cache *-stamp -pazpar2.spec config config.cache config.log @@ -15,4 +14,4 @@ configure Doxyfile dox deb-src -Debug \ No newline at end of file +Debug diff --git a/configure.ac b/configure.ac index 08cf459..f42ac5c 100644 --- a/configure.ac +++ b/configure.ac @@ -51,7 +51,6 @@ AC_DEFINE_UNQUOTED([PAZPAR2_VERSION_SHA1], ["$sha"], [Git SHA1]) AC_CONFIG_FILES([ Doxyfile Makefile - pazpar2.spec src/Makefile test/Makefile js/Makefile diff --git a/pazpar2.spec b/pazpar2.spec new file mode 100644 index 0000000..87dfc94 --- /dev/null +++ b/pazpar2.spec @@ -0,0 +1,119 @@ +Summary: Metasearcher +Name: pazpar2 +Version: 1.5.0 +Release: 1 +License: GPL +Group: Applications/Internet +Vendor: Index Data ApS +Source: pazpar2-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: libyaz4-devel +Packager: Adam Dickmeiss +URL: http://www.indexdata.com/pazpar2 + +%description +Pazpar2 is a high-performance, user interface-independent, data +model-independent metasearching middleware featuring merging, relevance +ranking, record sorting, and faceted results. + +Summary: pazpar2 daemon +Requires: libyaz4 + +%package -n pazpar2-js +Summary: pazpar2 JS +Group: Data +Requires: pazpar2 + +%post +if [ $1 = 1 ]; then + /sbin/chkconfig --add pazpar2 + /sbin/service pazpar2 start > /dev/null 2>&1 +else + /sbin/service pazpar2 restart > /dev/null 2>&1 +fi +%preun +if [ $1 = 0 ]; then + /sbin/service pazpar2 stop > /dev/null 2>&1 + /sbin/chkconfig --del pazpar2 +fi + +%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. + +%posttrans -n pazpar2-js +if [ -d /etc/httpd/conf.d ]; then + ln -sf /etc/pazpar2/ap2pazpar2-js.cfg /etc/httpd/conf.d/pazpar2-js.conf +fi +%preun -n pazpar2-js +if [ $1 = 0 ]; then + if [ -L /etc/httpd/conf.d/pazpar2-js.conf ]; then + rm /etc/httpd/conf.d/pazpar2-js.conf + fi +fi +%package -n pazpar2-doc +Summary: pazpar2 documentation +Group: Data + +%description -n pazpar2-doc +This package includes documentation for Pazpar2 - the metasearcher. + +%prep +%setup + +%build + +CFLAGS="$RPM_OPT_FLAGS" \ + ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \ + --with-yaz=/usr/bin +make CFLAGS="$RPM_OPT_FLAGS" + +%install +rm -fr ${RPM_BUILD_ROOT} +make prefix=${RPM_BUILD_ROOT}/%{_prefix} mandir=${RPM_BUILD_ROOT}/%{_mandir} \ + libdir=${RPM_BUILD_ROOT}/%{_libdir} install +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/ +mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d +install -m755 src/pazpar2.rpm.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pazpar2 +echo "Alias /pazpar2 /usr/share/pazpar2" >${RPM_BUILD_ROOT}/etc/pazpar2/ap2pazpar2-js.cfg +mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d +install -m644 src/pazpar2.rpm.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/pazpar2 + +%clean +rm -fr ${RPM_BUILD_ROOT} + +%files +%defattr(-,root,root) +%doc README LICENSE NEWS +%{_sbindir}/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 +%config %{_sysconfdir}/rc.d/init.d/pazpar2 +%config(noreplace) /etc/logrotate.d/pazpar2 +%{_mandir}/man5/pazpar2* +%{_mandir}/man7/pazpar2* +%{_mandir}/man8/pazpar2* + +%files -n pazpar2-js +%defattr(-,root,root) +%{_datadir}/pazpar2/js/pz2.js +%config %{_sysconfdir}/pazpar2/ap2pazpar2-js.cfg + +%files -n pazpar2-doc +%defattr(-,root,root) +%{_defaultdocdir}/pazpar2 diff --git a/pazpar2.spec.in b/pazpar2.spec.in deleted file mode 100644 index b7f35a3..0000000 --- a/pazpar2.spec.in +++ /dev/null @@ -1,119 +0,0 @@ -Summary: Metasearcher -Name: pazpar2 -Version: @VERSION@ -Release: 1 -License: GPL -Group: Applications/Internet -Vendor: Index Data ApS -Source: pazpar2-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: libyaz4-devel -Packager: Adam Dickmeiss -URL: http://www.indexdata.com/pazpar2 - -%description -Pazpar2 is a high-performance, user interface-independent, data -model-independent metasearching middleware featuring merging, relevance -ranking, record sorting, and faceted results. - -Summary: pazpar2 daemon -Requires: libyaz4 - -%package -n pazpar2-js -Summary: pazpar2 JS -Group: Data -Requires: pazpar2 - -%post -if [ $1 = 1 ]; then - /sbin/chkconfig --add pazpar2 - /sbin/service pazpar2 start > /dev/null 2>&1 -else - /sbin/service pazpar2 restart > /dev/null 2>&1 -fi -%preun -if [ $1 = 0 ]; then - /sbin/service pazpar2 stop > /dev/null 2>&1 - /sbin/chkconfig --del pazpar2 -fi - -%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. - -%posttrans -n pazpar2-js -if [ -d /etc/httpd/conf.d ]; then - ln -sf /etc/pazpar2/ap2pazpar2-js.cfg /etc/httpd/conf.d/pazpar2-js.conf -fi -%preun -n pazpar2-js -if [ $1 = 0 ]; then - if [ -L /etc/httpd/conf.d/pazpar2-js.conf ]; then - rm /etc/httpd/conf.d/pazpar2-js.conf - fi -fi -%package -n pazpar2-doc -Summary: pazpar2 documentation -Group: Data - -%description -n pazpar2-doc -This package includes documentation for Pazpar2 - the metasearcher. - -%prep -%setup - -%build - -CFLAGS="$RPM_OPT_FLAGS" \ - ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \ - --with-yaz=/usr/bin -make CFLAGS="$RPM_OPT_FLAGS" - -%install -rm -fr ${RPM_BUILD_ROOT} -make prefix=${RPM_BUILD_ROOT}/%{_prefix} mandir=${RPM_BUILD_ROOT}/%{_mandir} \ - libdir=${RPM_BUILD_ROOT}/%{_libdir} install -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/ -mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d -install -m755 src/pazpar2.rpm.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pazpar2 -echo "Alias /pazpar2 /usr/share/pazpar2" >${RPM_BUILD_ROOT}/etc/pazpar2/ap2pazpar2-js.cfg -mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d -install -m644 src/pazpar2.rpm.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/pazpar2 - -%clean -rm -fr ${RPM_BUILD_ROOT} - -%files -%defattr(-,root,root) -%doc README LICENSE NEWS -%{_sbindir}/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 -%config %{_sysconfdir}/rc.d/init.d/pazpar2 -%config(noreplace) /etc/logrotate.d/pazpar2 -%{_mandir}/man5/pazpar2* -%{_mandir}/man7/pazpar2* -%{_mandir}/man8/pazpar2* - -%files -n pazpar2-js -%defattr(-,root,root) -%{_datadir}/pazpar2/js/pz2.js -%config %{_sysconfdir}/pazpar2/ap2pazpar2-js.cfg - -%files -n pazpar2-doc -%defattr(-,root,root) -%{_defaultdocdir}/pazpar2 -- 1.7.10.4