6 Group: Applications/Internet
7 Vendor: Index Data ApS <info@indexdata.dk>
8 Source: pazpar2-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/%{name}-%{version}-root
10 BuildRequires: libyaz4-devel
11 Packager: Adam Dickmeiss <adam@indexdata.dk>
12 URL: http://www.indexdata.com/pazpar2
15 Pazpar2 is a high-performance, user interface-independent, data
16 model-independent metasearching middleware featuring merging, relevance
17 ranking, record sorting, and faceted results.
19 Summary: pazpar2 daemon
22 %package -n pazpar2-js
29 /sbin/chkconfig --add pazpar2
30 /sbin/service pazpar2 start > /dev/null 2>&1
32 /sbin/service pazpar2 restart > /dev/null 2>&1
36 /sbin/service pazpar2 stop > /dev/null 2>&1
37 /sbin/chkconfig --del pazpar2
40 %description -n pazpar2-js
41 This package includes the Java Script library pz2.js. It also adds an
42 Alias for Apache2 so that this library and other demo portals are
45 %posttrans -n pazpar2-js
46 if [ -d /etc/httpd/conf.d ]; then
47 ln -sf /etc/pazpar2/ap2pazpar2-js.cfg /etc/httpd/conf.d/pazpar2-js.conf
51 if [ -L /etc/httpd/conf.d/pazpar2-js.conf ]; then
52 rm /etc/httpd/conf.d/pazpar2-js.conf
55 %package -n pazpar2-doc
56 Summary: pazpar2 documentation
59 %description -n pazpar2-doc
60 This package includes documentation for Pazpar2 - the metasearcher.
67 CFLAGS="$RPM_OPT_FLAGS" \
68 ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \
70 make CFLAGS="$RPM_OPT_FLAGS"
73 rm -fr ${RPM_BUILD_ROOT}
74 make prefix=${RPM_BUILD_ROOT}/%{_prefix} mandir=${RPM_BUILD_ROOT}/%{_mandir} \
75 libdir=${RPM_BUILD_ROOT}/%{_libdir} install
76 mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2
77 mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/settings
78 mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/services-enabled
79 mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/services-available
80 cp etc/server.xml ${RPM_BUILD_ROOT}/etc/pazpar2/
81 cp etc/default.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
82 cp etc/services/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
83 cp etc/settings/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/settings/
84 cp etc/*.xsl ${RPM_BUILD_ROOT}/etc/pazpar2/
85 mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d
86 install -m755 src/pazpar2.rpm.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pazpar2
87 echo "Alias /pazpar2 /usr/share/pazpar2" >${RPM_BUILD_ROOT}/etc/pazpar2/ap2pazpar2-js.cfg
88 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
89 install -m644 src/pazpar2.rpm.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/pazpar2
92 rm -fr ${RPM_BUILD_ROOT}
96 %doc README LICENSE NEWS
98 %dir %{_sysconfdir}/pazpar2
99 %dir %{_sysconfdir}/pazpar2/settings
100 %dir %{_sysconfdir}/pazpar2/services-enabled
101 %dir %{_sysconfdir}/pazpar2/services-available
102 %config %{_sysconfdir}/pazpar2/*.xml
103 %config %{_sysconfdir}/pazpar2/*.xsl
104 %config %{_sysconfdir}/pazpar2/settings/*.xml
105 %config %{_sysconfdir}/pazpar2/services-available/*.xml
106 %config %{_sysconfdir}/rc.d/init.d/pazpar2
107 %config(noreplace) /etc/logrotate.d/pazpar2
108 %{_mandir}/man5/pazpar2*
109 %{_mandir}/man7/pazpar2*
110 %{_mandir}/man8/pazpar2*
113 %defattr(-,root,root)
114 %{_datadir}/pazpar2/js/pz2.js
115 %config %{_sysconfdir}/pazpar2/ap2pazpar2-js.cfg
117 %files -n pazpar2-doc
118 %defattr(-,root,root)
119 %{_defaultdocdir}/pazpar2