1 %define idmetaversion %(. ./IDMETA; echo $VERSION|tr -d '\n')
4 Version: %{idmetaversion}
7 Group: Applications/Internet
8 Vendor: Index Data ApS <info@indexdata.dk>
9 Source: pazpar2-%{version}.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-root
11 BuildRequires: libyaz5-devel >= 5.0.0
12 Packager: Adam Dickmeiss <adam@indexdata.dk>
13 URL: http://www.indexdata.com/pazpar2
14 Summary: pazpar2 daemon
15 Requires: libyaz5 >= 5.0.0
18 Pazpar2 is a high-performance, user interface-independent, data
19 model-independent metasearching middleware featuring merging, relevance
20 ranking, record sorting, and faceted results.
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 install DESTDIR=${RPM_BUILD_ROOT}
75 mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2
76 mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/settings
77 mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/services-enabled
78 mkdir -p ${RPM_BUILD_ROOT}/etc/pazpar2/services-available
79 cp etc/server.xml ${RPM_BUILD_ROOT}/etc/pazpar2/
80 cp etc/default.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
81 cp etc/services/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
82 cp etc/settings/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/settings/
83 cp -r etc/settings/mkc ${RPM_BUILD_ROOT}/etc/pazpar2/settings
84 cp -r etc/xsl ${RPM_BUILD_ROOT}/etc/pazpar2
85 mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d
86 install -m755 rpm/pazpar2.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 rpm/pazpar2.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/settings/mkc
101 %dir %{_sysconfdir}/pazpar2/services-enabled
102 %dir %{_sysconfdir}/pazpar2/services-available
103 %config %{_sysconfdir}/pazpar2/*.xml
104 %config %{_sysconfdir}/pazpar2/*.xsl
105 %config %{_sysconfdir}/pazpar2/settings/*.xml
106 %config %{_sysconfdir}/pazpar2/settings/*/*.xml
107 %config %{_sysconfdir}/pazpar2/services-available/*.xml
108 %config %{_sysconfdir}/rc.d/init.d/pazpar2
109 %config(noreplace) /etc/logrotate.d/pazpar2
110 %{_mandir}/man5/pazpar2*
111 %{_mandir}/man7/pazpar2*
112 %{_mandir}/man8/pazpar2*
115 %defattr(-,root,root)
116 %{_datadir}/pazpar2/js/pz2.js
117 %config %{_sysconfdir}/pazpar2/ap2pazpar2-js.cfg
119 %files -n pazpar2-doc
120 %defattr(-,root,root)
121 %{_defaultdocdir}/pazpar2