From 9490248cd99751bf77c62ad33e2ce779c5ba729b Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 15 Sep 2011 11:47:22 +0000 Subject: [PATCH] Refactor from harvester spec --- lui-solr.spec | 95 ++++++++++++++++++--------------------------------------- 1 file changed, 29 insertions(+), 66 deletions(-) diff --git a/lui-solr.spec b/lui-solr.spec index 9cc0cd2..d629532 100644 --- a/lui-solr.spec +++ b/lui-solr.spec @@ -5,108 +5,71 @@ Release: 1.indexdata License: IndexData Group: Applications/Internet Vendor: Index Data ApS -Source: masterkey-lui-%{version}.tar.gz +Source: masterkey-lui-solr-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root Packager: Dennis Schafroth URL: http://www.indexdata.dk/masterkey %description -The Local Unified Index is a index that can have subdatabase. The underlying index is a Solr/lucene index configured to use a specific LUI schema. +The Local Unified Index is a index that contains multiple logical indexes. The underlying index is a Solr/lucene index configured to use a specific LUI schema. -%package -n masterkey-lui-tomcat -Summary: Harvester Admin +%package -n masterkey-lui-solr-tomcat +Summary: Local Unified Index Solr Tomcat Requires: masterkey-lui-solr Group: Applications/Internet -%package -n masterkey-lui-tomcat6 -Summary: Harvester Admin Tomcat 6 integration -Requires: tomcat6 masterkey-lui-tomcat +%package -n masterkey-lui-solr-tomcat6 +Summary: Local Unified Index Solr Tomcat 6 integration +Requires: tomcat6 masterkey-lui-solr-tomcat Group: Applications/Internet +#%description -n masterkey-lui-solr-initd +#The LUI is the stand-alone Solr/Lucene Index with the LUI schema -%description -n masterkey-lui -The LUI is the stand-alone Solr/Lucene Index with the LUI schema - -%description -n masterkey-lui-tomcat +%description -n masterkey-lui-solr-tomcat The LUI Tomcat is part of the MasterKey suite. This package provides the LUI Tomcat context -%description -n masterkey-lui-tomcat6 +%description -n masterkey-lui-solr-tomcat6 The LUI is part of the MasterKey suite. This package provides Tomcat 6 integration. %prep %setup %build -%define lui-solr dist/ -%define lui-config schema/ -%define lui-data data/ - %install -mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/war -cp -a %{lui-solr}/* ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/war -cp -a %{lui-solr}/* ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/conf +mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/war +cp -a dist/* ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/war +mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/conf +cp -a solr-conf/* ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/lui/solr/conf -mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/harvester/ -# cp -a etc/harvester.properties ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/harvester/ +mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/lui/solr +# cp -a etc/harvester.properties ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/lui/solr -mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/log/masterkey/harvester +mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/log/masterkey/lui/solr +mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/lib/masterkey/lui/solr/data #tomcat context -sed -e 's@docBase=".*"@docBase="%{_datadir}\/masterkey\/harvester"@g' etc/harvester-context.xml > ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/harvester/harvester-context.xml - -mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/harvester-admin/ -cp -a %{admin}/* ${RPM_BUILD_ROOT}/%{_datadir}/masterkey/harvester-admin/ - -mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/harvester-admin/ -#cp -a etc/harvester.properties ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/harvester-admin/ - -mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/log/masterkey/harvester-admin - -#tomcat context -sed -e 's@docBase=".*"@docBase="%{_datadir}\/masterkey\/harvester"@g' etc/harvester-admin-context.xml > ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/harvester-admin/harvester-admin-context.xml - +sed -e 's@docBase=".*"@docBase="%{_datadir}\/masterkey\/lui/solr"@g' etc/solr-tomcat-context.xml > ${RPM_BUILD_ROOT}/%{_sysconfdir}/masterkey/lui/solr/lui-solr-context.xml %clean rm -fr ${RPM_BUILD_ROOT} -%post -n masterkey-harvester-tomcat5 -ln -sf %{_sysconfdir}/masterkey/harvester/harvester-context.xml %{_sysconfdir}/tomcat5/Catalina/localhost/harvester.xml +%post -n masterkey-lui-solr-tomcat6 +ln -sf %{_sysconfdir}/masterkey/lui/solr/lui-solr-context.xml %{_sysconfdir}/tomcat6/Catalina/localhost/lui-solr.xml -%postun -n masterkey-harvester-tomcat5 +%postun -n masterkey-lui-solr-tomcat6 if [ $1 = 0 ]; then - rm -f %{_sysconfdir}/tomcat5/Catalina/localhost/harvester.xml + rm -rf %{_sysconfdir}/tomcat6/Catalina/localhost/lui-solr.xml fi -%post -n masterkey-harvester-admin-tomcat5 -ln -sf %{_sysconfdir}/masterkey/harvester-admin/harvester-admin-context.xml %{_sysconfdir}/tomcat5/Catalina/localhost/harvester-admin.xml - -%postun -n masterkey-harvester-admin-tomcat5 -if [ $1 = 0 ]; then - rm -f %{_sysconfdir}/tomcat5/Catalina/localhost/harvester-admin.xml -fi - -%post -n masterkey-harvester-tomcat6 -ln -sf %{_sysconfdir}/masterkey/harvester/harvester-context.xml %{_sysconfdir}/tomcat6/Catalina/localhost/harvester.xml - -%postun -n masterkey-harvester-tomcat6 -if [ $1 = 0 ]; then - rm -f %{_sysconfdir}/tomcat6/Catalina/localhost/harvester.xml -fi - -%post -n masterkey-harvester-admin-tomcat6 -ln -sf %{_sysconfdir}/masterkey/harvester-admin/harvester-admin-context.xml %{_sysconfdir}/tomcat6/Catalina/localhost/harvester-admin.xml - %files %defattr(-,root,root) -%{_datadir}/masterkey/harvester -%attr(750,indexdata,indexdata) %dir %{_localstatedir}/lib/masterkey/lui/ +%{_datadir}/masterkey/lui/solr +%attr(750,tomcat,tomcat) %dir %{_localstatedir}/lib/masterkey/lui/solr -%files -n masterkey-lui-tomcat +%files -n masterkey-lui-solr-tomcat %defattr(-,root,root) -%config %{_sysconfdir}/masterkey/lui/lui-context.xml +%config %{_sysconfdir}/masterkey/lui/solr/lui-solr-context.xml -%files -n masterkey-harvester-tomcat5 -%files -n masterkey-harvester-admin-tomcat5 -%files -n masterkey-harvester-tomcat6 -%files -n masterkey-harvester-admin-tomcat6 +%files -n masterkey-lui-solr-tomcat6 -- 1.7.10.4