Skip to content

Add nouveau sub-package #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rpm/SOURCES/nouveau.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[nouveau]
what = ever
21 changes: 19 additions & 2 deletions rpm/SPECS/couchdb.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
%define name couchdb
%define prefix /opt/%{name}

# NOTE: Stripping binaries causes issues so we skip it.
%define __os_install_post %{nil}

Summary: RESTful document oriented database
License: Apache License v2.0
Name: %{name}
Expand All @@ -23,6 +26,7 @@ Source: https://www.apache.org/dist/couchdb/source/${version}/apache-couc
Source1: %{name}.service
Source2: %{name}.init
Source3: 10-filelog.ini
Source4: nouveau.ini
Source5: %{name}.logrotate
Prefix: %{prefix}
Group: Applications/Databases
Expand Down Expand Up @@ -90,8 +94,14 @@ that provides means to make HTTP requests. There are a multitude of third-party
client libraries that make this even easier for a variety of programming
languages and environments.

# NOTE: Stripping binaries causes issues so we skip it.
%define __os_install_post %{nil}
%package nouveau
Summary: Full text search engine for couchdb
Requires: couchdb

%description nouveau
Nouveau indexes enable you to query a database by using the Lucene Query Parser Syntax.
A nouveau index uses one, or multiple, fields from your documents. You can use a nouveau
index to run queries to find documents based on the content they contain.

%prep

Expand Down Expand Up @@ -129,6 +139,7 @@ if ! /usr/bin/getent passwd couchdb > /dev/null; then /usr/sbin/adduser \
%{__install} -d -m0750 %{buildroot}%{_sharedstatedir}/%{name}
%endif
%{__install} -Dp -m0644 %{SOURCE3} %{buildroot}/opt/%{name}/etc/default.d/10-filelog.ini
%{__install} -Dp -m0644 %{SOURCE3} %{buildroot}/opt/%{name}/etc/local.d/nouveau.ini
%{__install} -Dp -m0644 %{SOURCE5} %{buildroot}/etc/logrotate.d/%{name}
/bin/find %{buildroot}/opt/%{name} -name *.ini -exec %{__chmod} 0640 {} \;

Expand Down Expand Up @@ -176,6 +187,9 @@ fi
/sbin/chkconfig --add %{name} || :
%endif

%post nouveau
%systemd_post couchdb.service

%preun
%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version}
%systemd_preun %{name}.service
Expand Down Expand Up @@ -215,6 +229,9 @@ fi
%{_initrddir}/%{name}
%endif

%files nouveau
%defattr(-,root,root)
%config(noreplace) /opt/couchdb/etc/local.d/nouveau.ini

%changelog
* Tue May 2 2017 CouchDB Developers <[email protected]> 2.0.0-1
Expand Down