Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:crameleon:LibertaCasa:Mail
solr
solr.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File solr.spec of Package solr
# # spec file for package solr # # Copyright (c) 2022 SUSE LLC # Copyright (c) 2012 technikteam@e-fellows.net # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?suse_version} >= 1230 || 0%{?centos_version} >= 700 %bcond_without systemd %else %bcond_with systemd %endif Name: solr Version: 8.9.0 Release: 0 License: Apache-2.0 Summary: Apache Solr Url: http://lucene.apache.org/solr/ Group: System Environment/Daemons Source0: %{name}-%{version}.tgz #Source0: %{name}-%{version}-src.tgz Source1: initrd.solr Source2: solr.sh Source4: solr.tmpfile Requires: java Recommends: awk Recommends: bash Recommends: coreutils Recommends: findutils Recommends: grep Recommends: lsof Recommends: procps BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes %if %{with systemd} BuildRequires: systemd Suggests: systemd %{?systemd_requires} Source3: solr.service %endif %define solruser solr %define solrgroup apache %define _initddir %{_sysconfdir}/init.d %description Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly scalable, providing distributed search and index replication, and it powers the search and navigation features of many of the world's largest internet sites. %prep %setup -q %build %install install -D -m 0755 bin/solr %{buildroot}%{_bindir}/solr install -D -m 0644 server/solr/solr.xml %{buildroot}%{_localstatedir}/lib/%{name}/%{name}.xml mkdir -p %{buildroot}/%{_datadir}/%{name} %{buildroot}%{_sysconfdir}/%{name} %{buildroot}/%{_sbindir} cp -a server %{buildroot}%{_datadir}/%{name} cat >> %{buildroot}%{_sysconfdir}/%{name}/%{name}.in.sh << EOF LOG4J_PROPS=%{_sysconfdir}/%{name}/log4j.properties SOLR_LOGS_DIR=%{_localstatedir}/log/%{name} SOLR_SERVER_DIR=%{_datadir}/%{name} SOLR_PID_DIR=/run/%{name}/ SOLR_HOME=%{_localstatedir}/lib/%{name}/ SOLR_LISTEN_HOST=localhost EOF %if %{with systemd} %{__install} -Dp -m0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/systemd/system/%{name}.service ln -s %{_prefix}/lib/systemd/system/solr.service %{buildroot}/%{_sbindir}/rc%{name} install -D -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf %else mkdir -p %{buildroot}%{_initddir} install -D -m 755 %{SOURCE1} %{buildroot}%{_initddir}/%{name} ln -s %{_initddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name} %endif mkdir -p %{buildroot}%{_libdir}/%{name} install -D -m 755 %{SOURCE2} %{buildroot}%{_libdir}/%{name} mkdir -p %{buildroot}%{_localstatedir}/log/%{name} # really, really dirty hack to make older versions of Solr run with OpenJDK 17 sed -i -e '/CMS/d' -e '/UseConcMarkSweepGC/d' -e '/SOLR_TIP=`dirname/d' -e 's?SOLR_TIP=`cd.*?SOLR_TIP="/usr/share/solr"?' %{buildroot}/usr/bin/solr %if 0%{?suse_version} %fdupes %{buildroot}%{_datadir} %endif %pre if ! /usr/bin/getent group %{solrgroup} &>/dev/null; then echo "Creating %{solrgroup} user" /usr/sbin/groupadd -r %{solrgroup} fi if ! /usr/bin/getent passwd %{solruser} &>/dev/null; then echo "Creating %solruser user" /usr/sbin/useradd -r -g %{solrgroup} \ -r %{solruser} fi %if %{with systemd} %service_add_pre %{name}.service %endif %post %if %{with systemd} %if 0%{?suse_version} %service_add_post %{name}.service %tmpfiles_create %{_tmpfilesdir}/solr.conf %fillup_only %endif %if 0%{?centos_version} %systemd_post solr.service %endif %else %if 0%{?suse_version} %{fillup_and_insserv %{name}} %endif %if 0%{?centos_version} /sbin/chkconfig --add %{name} %endif %endif %preun %if %{with systemd} %if 0%{?suse_version} %service_del_preun %{name}.service %endif %if 0%{?centos_version} %systemd_preun solr.service %endif %else %if 0%{?suse_version} %stop_on_removal %{name} %endif %if 0%{?centos_version} if [ "$1" = 0 ]; then /sbin/service %{name} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name} fi %endif %endif %postun %if %{with systemd} %if 0%{?suse_version} %service_del_postun %{name}.service %endif %if 0%{?centos_version} %systemd_postun_with_restart solr.service %endif %else %if 0%{?suse_version} %restart_on_update %{name} %{insserv_cleanup} %endif %if 0%{?centos_version} if [ "$1" -ge 1 ]; then /sbin/service %{name} condrestart >/dev/null 2>&1 fi %endif %endif %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.in.sh %config(noreplace) %attr(-,%{solruser},%{solrgroup}) %{_localstatedir}/lib/solr/solr.xml %dir %{_sysconfdir}/%{name} %{_datadir}/%{name} %{_bindir}/%{name} %if %{with systemd} %{_prefix}/lib/systemd/system/%{name}.service %{_tmpfilesdir}/%{name}.conf %else %config %{_initddir}/%{name} %endif %{_sbindir}/rc%{name} %attr(750,%{solruser},%{solrgroup}) %dir %{_libdir}/%{name} %attr(750,%{solruser},%{solrgroup}) %{_libdir}/%{name}/solr.sh %attr(755,%{solruser},%{solrgroup}) %dir %{_localstatedir}/log/solr %attr(755,%{solruser},%{solrgroup}) %dir %{_localstatedir}/lib/solr %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor