Commit 30ee3bbc86b296d8337fb3fab49f602d8657a634
1 parent
f60ef2f1
Exists in
master
and in
5 other branches
Added colab repo specs
Showing
4 changed files
with
501 additions
and
0 deletions
Show diff stats
| @@ -0,0 +1,35 @@ | @@ -0,0 +1,35 @@ | ||
| 1 | +%define name colab-deps | ||
| 2 | +%define version 1.3 | ||
| 3 | +%define release 1 | ||
| 4 | + | ||
| 5 | +Summary: Collaboration platform for communities (Pyton dependencies) | ||
| 6 | +Name: %{name} | ||
| 7 | +Version: %{version} | ||
| 8 | +Release: %{release} | ||
| 9 | +Source0: %{name}-%{version}.tar.gz | ||
| 10 | +License: Various | ||
| 11 | +Group: Development/Tools | ||
| 12 | +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot | ||
| 13 | +Prefix: %{_prefix} | ||
| 14 | +Vendor: Sergio Oliveira <sergio@tracy.com.br> | ||
| 15 | +Url: https://gitlab.com/softwarepublico/colab-deps | ||
| 16 | +BuildRequires: gettext, libxml2-devel, libxslt-devel, openssl-devel, libffi-devel, libjpeg-turbo-devel, zlib-devel, freetype-devel, postgresql-devel, python-devel, libyaml-devel, python-virtualenv, libev-devel | ||
| 17 | + | ||
| 18 | +%description | ||
| 19 | +Integrated software development platform (Python dependencies). | ||
| 20 | + | ||
| 21 | +%prep | ||
| 22 | +%setup -n %{name}-%{version} -n %{name}-%{version} | ||
| 23 | + | ||
| 24 | +%build | ||
| 25 | +make | ||
| 26 | + | ||
| 27 | +%install | ||
| 28 | +%make_install | ||
| 29 | + | ||
| 30 | +%clean | ||
| 31 | +rm -rf $RPM_BUILD_ROOT | ||
| 32 | + | ||
| 33 | +%files | ||
| 34 | +/usr/lib/colab | ||
| 35 | +%defattr(-,root,root) |
| @@ -0,0 +1,185 @@ | @@ -0,0 +1,185 @@ | ||
| 1 | +%define name colab | ||
| 2 | +%define version 2.0a2 | ||
| 3 | +%define unmangled_version 2.0a2 | ||
| 4 | +%define release 2 | ||
| 5 | +%define buildvenv /var/tmp/%{name}-%{version} | ||
| 6 | + | ||
| 7 | +Summary: Collaboration platform for communities | ||
| 8 | +Name: %{name} | ||
| 9 | +Version: %{version} | ||
| 10 | +Release: %{release} | ||
| 11 | +Source0: %{name}-%{unmangled_version}.tar.gz | ||
| 12 | +License: GPLv2 | ||
| 13 | +Group: Development/Tools | ||
| 14 | +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot | ||
| 15 | +Prefix: %{_prefix} | ||
| 16 | +Vendor: Sergio Oliveira <sergio@tracy.com.br> | ||
| 17 | +Url: https://github.com/colab-community/colab | ||
| 18 | +BuildArch: noarch | ||
| 19 | +BuildRequires: colab-deps, python-virtualenv | ||
| 20 | +Requires: colab-deps, solr, mailman-api | ||
| 21 | + | ||
| 22 | +%description | ||
| 23 | +Integrated software development platform. | ||
| 24 | + | ||
| 25 | +%prep | ||
| 26 | +%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version} | ||
| 27 | + | ||
| 28 | +%build | ||
| 29 | +# install colab into virtualenv to make sure dependencies are OK | ||
| 30 | +rm -rf %{buildvenv} | ||
| 31 | +cp -r /usr/lib/colab %{buildvenv} | ||
| 32 | +PATH=%{buildvenv}/bin:$PATH pip install --no-index . | ||
| 33 | +virtualenv --relocatable %{buildvenv} | ||
| 34 | + | ||
| 35 | +# cleanup virtualenv | ||
| 36 | +rpm -ql colab-deps | sed '/^\/usr\/lib\/colab\// !d; s#/usr/lib/colab/##' > cleanup.list | ||
| 37 | +while read f; do | ||
| 38 | + if [ -f "%{buildvenv}/$f" ]; then | ||
| 39 | + rm -f "%{buildvenv}/$f" | ||
| 40 | + fi | ||
| 41 | +done < cleanup.list | ||
| 42 | +rm -f cleanup.list | ||
| 43 | +find %{buildvenv} -type d -empty -delete | ||
| 44 | + | ||
| 45 | +%install | ||
| 46 | +mkdir -p %{buildroot}/etc/colab | ||
| 47 | +mkdir -p %{buildroot}/usr/lib | ||
| 48 | + | ||
| 49 | +# install virtualenv | ||
| 50 | +rm -rf %{buildroot}/usr/lib/colab | ||
| 51 | +cp -r %{buildvenv} %{buildroot}/usr/lib/colab | ||
| 52 | +mkdir -p %{buildroot}/%{_bindir} | ||
| 53 | +cat > %{buildroot}/%{_bindir}/colab-admin <<EOF | ||
| 54 | +#!/bin/sh | ||
| 55 | +set -e | ||
| 56 | + | ||
| 57 | +if [ "$USER" = colab ]; then | ||
| 58 | + exec /usr/lib/colab/bin/colab-admin "\$@" | ||
| 59 | +else | ||
| 60 | + exec sudo -u colab /usr/lib/colab/bin/colab-admin "\$@" | ||
| 61 | +fi | ||
| 62 | +EOF | ||
| 63 | +chmod +x %{buildroot}/%{_bindir}/colab-admin | ||
| 64 | + | ||
| 65 | +# install initscript | ||
| 66 | +install -d -m 0755 %{buildroot}/lib/systemd/system | ||
| 67 | +install -m 0644 misc/lib/systemd/system/colab.service %{buildroot}/lib/systemd/system | ||
| 68 | +# install crontab | ||
| 69 | +install -d -m 0755 %{buildroot}/etc/cron.d | ||
| 70 | +install -m 0644 misc/etc/cron.d/colab %{buildroot}/etc/cron.d | ||
| 71 | + | ||
| 72 | +%clean | ||
| 73 | +rm -rf $RPM_BUILD_ROOT | ||
| 74 | +rm -rf %{buildvenv} | ||
| 75 | + | ||
| 76 | +%files | ||
| 77 | +/usr/lib/colab | ||
| 78 | +%{_bindir}/* | ||
| 79 | +/etc/cron.d/colab | ||
| 80 | +/lib/systemd/system/colab.service | ||
| 81 | + | ||
| 82 | +%post | ||
| 83 | +groupadd colab || true | ||
| 84 | +if ! id colab; then | ||
| 85 | + useradd --system --gid colab --home-dir /usr/lib/colab --no-create-home colab | ||
| 86 | +fi | ||
| 87 | + | ||
| 88 | +mkdir -p /etc/colab | ||
| 89 | + | ||
| 90 | +if [ ! -f /etc/colab/settings.yaml ]; then | ||
| 91 | + SECRET_KEY=$(openssl rand -hex 32) | ||
| 92 | + cat > /etc/colab/settings.yaml <<EOF | ||
| 93 | +## Set to false in production | ||
| 94 | +DEBUG: true | ||
| 95 | +TEMPLATE_DEBUG: true | ||
| 96 | + | ||
| 97 | +## System admins | ||
| 98 | +ADMINS: &admin | ||
| 99 | + - | ||
| 100 | + - John Foo | ||
| 101 | + - john@example.com | ||
| 102 | + - | ||
| 103 | + - Mary Bar | ||
| 104 | + - mary@example.com | ||
| 105 | + | ||
| 106 | +MANAGERS: *admin | ||
| 107 | + | ||
| 108 | +COLAB_FROM_ADDRESS: '"Colab" <noreply@example.com>' | ||
| 109 | +SERVER_EMAIL: '"Colab" <noreply@example.com>' | ||
| 110 | + | ||
| 111 | +EMAIL_HOST: localhost | ||
| 112 | +EMAIL_PORT: 25 | ||
| 113 | +EMAIL_SUBJECT_PREFIX: '[colab]' | ||
| 114 | + | ||
| 115 | +SECRET_KEY: '$SECRET_KEY' | ||
| 116 | + | ||
| 117 | +SITE_URL: 'http://localhost:8001/' | ||
| 118 | +BROWSERID_AUDIENCES: | ||
| 119 | + - http://localhost:8001 | ||
| 120 | +# - http://example.com | ||
| 121 | +# - https://example.org | ||
| 122 | +# - http://example.net | ||
| 123 | + | ||
| 124 | +ALLOWED_HOSTS: | ||
| 125 | + - localhost | ||
| 126 | +# - example.com | ||
| 127 | +# - example.org | ||
| 128 | +# - example.net | ||
| 129 | + | ||
| 130 | +## Disable indexing | ||
| 131 | +ROBOTS_NOINDEX: false | ||
| 132 | + | ||
| 133 | +## Disable browser id authentication | ||
| 134 | +# BROWSERID_ENABLED: true | ||
| 135 | +EOF | ||
| 136 | + chown root:colab /etc/colab/settings.yaml | ||
| 137 | + chmod 0640 /etc/colab/settings.yaml | ||
| 138 | +fi | ||
| 139 | + | ||
| 140 | +mkdir -p /etc/colab/settings.d | ||
| 141 | + | ||
| 142 | +if [ ! -f /etc/colab/settings.d/00-database.yaml ]; then | ||
| 143 | + cat > /etc/colab/settings.d/00-database.yaml <<EOF | ||
| 144 | +DATABASES: | ||
| 145 | + default: | ||
| 146 | + ENGINE: django.db.backends.postgresql_psycopg2 | ||
| 147 | + NAME: colab | ||
| 148 | + USER: colab | ||
| 149 | + HOST: localhost | ||
| 150 | + PORT: 5432 | ||
| 151 | +EOF | ||
| 152 | + chown root:colab /etc/colab/settings.d/00-database.yaml | ||
| 153 | + chmod 0640 /etc/colab/settings.d/00-database.yaml | ||
| 154 | +fi | ||
| 155 | + | ||
| 156 | +# only applies if there is a local PostgreSQL server | ||
| 157 | +if [ -x /usr/bin/postgres ]; then | ||
| 158 | + | ||
| 159 | + # start/enable the service | ||
| 160 | + postgresql-setup initdb || true | ||
| 161 | + systemctl start postgresql | ||
| 162 | + systemctl enable postgresql | ||
| 163 | + | ||
| 164 | + if [ "$(sudo -u postgres -i psql --quiet --tuples-only -c "select count(*) from pg_user where usename = 'colab';")" -eq 0 ]; then | ||
| 165 | + # create user | ||
| 166 | + sudo -u postgres -i createuser colab | ||
| 167 | + fi | ||
| 168 | + | ||
| 169 | + if [ "$(sudo -u postgres -i psql --quiet --tuples-only -c "select count(1) from pg_database where datname = 'colab';")" -eq 0 ]; then | ||
| 170 | + # create database | ||
| 171 | + sudo -u postgres -i createdb --owner=colab colab | ||
| 172 | + fi | ||
| 173 | + | ||
| 174 | + colab-admin migrate | ||
| 175 | +fi | ||
| 176 | + | ||
| 177 | +mkdir -p /var/lib/colab-assets | ||
| 178 | +chown colab:colab /var/lib/colab-assets | ||
| 179 | + | ||
| 180 | +mkdir -p /usr/share/nginx/ | ||
| 181 | + | ||
| 182 | +ln -s /var/lib/colab-assets /usr/share/nginx/colab | ||
| 183 | + | ||
| 184 | +yes yes | colab-admin collectstatic | ||
| 185 | + |
| @@ -0,0 +1,217 @@ | @@ -0,0 +1,217 @@ | ||
| 1 | +%global source_dir %{_datadir}/%{name}-source | ||
| 2 | +%global inst_srcdir %{buildroot}/%{source_dir} | ||
| 3 | + | ||
| 4 | +Name: libev | ||
| 5 | +Summary: High-performance event loop/event model with lots of features | ||
| 6 | +Version: 4.15 | ||
| 7 | +Release: 4%{?dist} | ||
| 8 | +License: BSD or GPLv2+ | ||
| 9 | +URL: http://software.schmorp.de/pkg/libev.html | ||
| 10 | +Source0: http://dist.schmorp.de/libev/Attic/%{name}-%{version}.tar.gz | ||
| 11 | + | ||
| 12 | +BuildRequires: autoconf automake libtool | ||
| 13 | + | ||
| 14 | +Patch0: libev-4.15-Modernize-the-configure.ac.patch | ||
| 15 | +Patch1: libev-4.15-Respect-the-CFLAGS-if-defined.patch | ||
| 16 | + | ||
| 17 | +%description | ||
| 18 | +Libev is modeled (very loosely) after libevent and the Event Perl | ||
| 19 | +module, but is faster, scales better and is more correct, and also more | ||
| 20 | +featureful. And also smaller. | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +%package devel | ||
| 24 | +Summary: Development headers for libev | ||
| 25 | +Requires: %{name}%{?_isa} = %{version}-%{release} | ||
| 26 | + | ||
| 27 | +%description devel | ||
| 28 | +This package contains the development headers and libraries for libev. | ||
| 29 | + | ||
| 30 | + | ||
| 31 | +%package libevent-devel | ||
| 32 | +Summary: Compatibility development header with libevent for %{name}. | ||
| 33 | +Requires: %{name}-devel%{?_isa} = %{version}-%{release} | ||
| 34 | + | ||
| 35 | +# The event.h file actually conflicts with the one from libevent-devel | ||
| 36 | +Conflicts: libevent-devel | ||
| 37 | + | ||
| 38 | +%description libevent-devel | ||
| 39 | +This package contains a development header to make libev compatible with | ||
| 40 | +libevent. | ||
| 41 | + | ||
| 42 | + | ||
| 43 | +%package source | ||
| 44 | +Summary: High-performance event loop/event model with lots of features | ||
| 45 | +%if 0%{?fedora} >= 12 || 0%{?rhel} > 5 | ||
| 46 | +BuildArch: noarch | ||
| 47 | +%endif | ||
| 48 | + | ||
| 49 | +%description source | ||
| 50 | +This package contains the source code for libev. | ||
| 51 | + | ||
| 52 | + | ||
| 53 | +%prep | ||
| 54 | +%setup -q | ||
| 55 | + | ||
| 56 | +%patch0 -p1 | ||
| 57 | +%patch1 -p1 | ||
| 58 | + | ||
| 59 | +autoreconf -i | ||
| 60 | + | ||
| 61 | + | ||
| 62 | +%build | ||
| 63 | +%configure --disable-static --with-pic | ||
| 64 | +make %{?_smp_mflags} | ||
| 65 | + | ||
| 66 | + | ||
| 67 | +%check | ||
| 68 | +make check | ||
| 69 | + | ||
| 70 | + | ||
| 71 | +%install | ||
| 72 | +make install DESTDIR=%{buildroot} INSTALL="install -p" | ||
| 73 | + | ||
| 74 | +rm -rf %{buildroot}%{_libdir}/%{name}.la | ||
| 75 | + | ||
| 76 | +# Make the source package | ||
| 77 | +mkdir -p %{inst_srcdir} | ||
| 78 | + | ||
| 79 | +find . -type f | grep -E '.*\.(c|h|am|ac|inc|m4|h.in|man.pre|pl|txt)$' | xargs tar cf - | (cd %{inst_srcdir} && tar xf -) | ||
| 80 | +install -p -m 0644 Changes ev.pod LICENSE README %{inst_srcdir} | ||
| 81 | + | ||
| 82 | + | ||
| 83 | +%post -p /sbin/ldconfig | ||
| 84 | +%postun -p /sbin/ldconfig | ||
| 85 | + | ||
| 86 | + | ||
| 87 | +%files | ||
| 88 | +%doc Changes LICENSE README | ||
| 89 | +%{_libdir}/%{name}.so.4 | ||
| 90 | +%{_libdir}/%{name}.so.4.0.0 | ||
| 91 | + | ||
| 92 | +%files devel | ||
| 93 | +%{_includedir}/ev++.h | ||
| 94 | +%{_includedir}/ev.h | ||
| 95 | +%{_libdir}/%{name}.so | ||
| 96 | +%{_mandir}/man?/* | ||
| 97 | + | ||
| 98 | +%files libevent-devel | ||
| 99 | +%{_includedir}/event.h | ||
| 100 | + | ||
| 101 | +%files source | ||
| 102 | +%{source_dir} | ||
| 103 | + | ||
| 104 | + | ||
| 105 | +%changelog | ||
| 106 | +* Thu Apr 17 2014 Lokesh Mandvekar <lsm5@redhat.com> - 4.15-4 | ||
| 107 | +- Rebuilt for RHEL-7 | ||
| 108 | + | ||
| 109 | +* Tue Nov 26 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 4.15-3 | ||
| 110 | +- Get the package closer to what upstream intended: | ||
| 111 | + - Do not move the headers into a subfolder of /usr/include | ||
| 112 | + - Make a libev-libevent-devel subpackage to contain the libevent | ||
| 113 | + compatibility header, so that only this subpackage conflicts with | ||
| 114 | + libevent-devel, not all of libev-devel | ||
| 115 | + - Drop the pkgconfig file, as upstream rejected it several times already. | ||
| 116 | + | ||
| 117 | +* Sun Sep 8 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 4.15-2 | ||
| 118 | +- Bump (koji was broken) | ||
| 119 | + | ||
| 120 | +* Sun Sep 8 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 4.15-1 | ||
| 121 | +- Update to 4.15 (rhbz 987489) | ||
| 122 | +- Fix dates in spec | ||
| 123 | + | ||
| 124 | +* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.11-3 | ||
| 125 | +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild | ||
| 126 | + | ||
| 127 | +* Fri Feb 08 2013 Mathieu Bridon <bochecha@fedoraproject.org> - 4.11-2 | ||
| 128 | +- Make a patch out of Michal's pkgconfig support. | ||
| 129 | +- Modernize the configure.ac file for Automake >= 1.13. | ||
| 130 | +- Respect the Fedora CFLAGS | ||
| 131 | + https://bugzilla.redhat.com/show_bug.cgi?id=908096 | ||
| 132 | + | ||
| 133 | +* Fri Sep 28 2012 Mathieu Bridon <bochecha@fedoraproject.org> - 4.11-1 | ||
| 134 | +- Update to 4.11 | ||
| 135 | + | ||
| 136 | +* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.04-3 | ||
| 137 | +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild | ||
| 138 | + | ||
| 139 | +* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.04-2 | ||
| 140 | +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild | ||
| 141 | + | ||
| 142 | +* Tue Aug 9 2011 Tom Callaway <spot@fedoraproject.org> - 4.04-1 | ||
| 143 | +- move man page | ||
| 144 | +- cleanup spec | ||
| 145 | +- update to 4.04 | ||
| 146 | + | ||
| 147 | +* Mon Jun 13 2011 Matěj Cepl <mcepl@redhat.com> - 4.03-2 | ||
| 148 | +- EL5 cannot have noarch subpackages. | ||
| 149 | + | ||
| 150 | +* Sat Feb 5 2011 Michal Nowak <mnowak@redhat.com> - 4.03-1 | ||
| 151 | +- 4.03; RHBZ#674022 | ||
| 152 | +- add a -source subpackage (Mathieu Bridon); RHBZ#672153 | ||
| 153 | + | ||
| 154 | +* Mon Jan 10 2011 Michal Nowak <mnowak@redhat.com> - 4.01-1 | ||
| 155 | +- 4.01 | ||
| 156 | +- fix grammar in %%description | ||
| 157 | + | ||
| 158 | +* Sat Jan 2 2010 Michal Nowak <mnowak@redhat.com> - 3.90-1 | ||
| 159 | +- 3.9 | ||
| 160 | + | ||
| 161 | +* Mon Aug 10 2009 Michal Nowak <mnowak@redhat.com> - 3.80-1 | ||
| 162 | +- 3.8 | ||
| 163 | +- always use the most recent automake | ||
| 164 | +- BuildRequires now libtool | ||
| 165 | + | ||
| 166 | +* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.70-3 | ||
| 167 | +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild | ||
| 168 | + | ||
| 169 | +* Fri Jul 17 2009 Michal Nowak <mnowak@redhat.com> - 3.70-2 | ||
| 170 | +- spec file change, which prevented uploading most recent tarball | ||
| 171 | + so the RPM was "3.70" but tarball was from 3.60 | ||
| 172 | + | ||
| 173 | +* Fri Jul 17 2009 Michal Nowak <mnowak@redhat.com> - 3.70-1 | ||
| 174 | +- v3.7 | ||
| 175 | +- list libev soname explicitly | ||
| 176 | + | ||
| 177 | +* Mon Jun 29 2009 Michal Nowak <mnowak@redhat.com> - 3.60-1 | ||
| 178 | +- previous version was called "3.6" but this is broken update | ||
| 179 | + path wrt version "3.53" -- thus bumping to "3.60" | ||
| 180 | + | ||
| 181 | +* Thu Apr 30 2009 Michal Nowak <mnowak@redhat.com> - 3.6-1 | ||
| 182 | +- 3.60 | ||
| 183 | +- fixed few mixed-use-of-spaces-and-tabs warnings in spec file | ||
| 184 | + | ||
| 185 | +* Thu Mar 19 2009 Michal Nowak <mnowak@redhat.com> - 3.53-1 | ||
| 186 | +- 3.53 | ||
| 187 | + | ||
| 188 | +* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.52-2 | ||
| 189 | +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild | ||
| 190 | + | ||
| 191 | +* Wed Jan 07 2009 Michal Nowak <mnowak@redhat.com> - 3.52-1 | ||
| 192 | +- 3.52 | ||
| 193 | + | ||
| 194 | +* Wed Dec 24 2008 Michal Nowak <mnowak@redhat.com> - 3.51-1 | ||
| 195 | +- 3.51 | ||
| 196 | + | ||
| 197 | +* Thu Nov 20 2008 Michal Nowak <mnowak@redhat.com> - 3.49-1 | ||
| 198 | +- version bump: 3.49 | ||
| 199 | + | ||
| 200 | +* Sun Nov 9 2008 Michal Nowak <mnowak@redhat.com> - 3.48-1 | ||
| 201 | +- version bump: 3.48 | ||
| 202 | + | ||
| 203 | +* Mon Oct 6 2008 kwizart <kwizart at gmail.com> - 3.44-1 | ||
| 204 | +- bump to 3.44 | ||
| 205 | + | ||
| 206 | +* Tue Sep 2 2008 kwizart <kwizart at gmail.com> - 3.43-4 | ||
| 207 | +- Fix pkgconfig support | ||
| 208 | + | ||
| 209 | +* Tue Aug 12 2008 Michal Nowak <mnowak@redhat.com> - 3.43-2 | ||
| 210 | +- removed libev.a | ||
| 211 | +- installing with "-p" | ||
| 212 | +- event.h is removed intentionaly, because is there only for | ||
| 213 | + backward compatibility with libevent | ||
| 214 | + | ||
| 215 | +* Mon Aug 04 2008 Michal Nowak <mnowak@redhat.com> - 3.43-1 | ||
| 216 | +- initial package | ||
| 217 | + |
| @@ -0,0 +1,64 @@ | @@ -0,0 +1,64 @@ | ||
| 1 | +# | ||
| 2 | +# Spec file do solr | ||
| 3 | +# | ||
| 4 | + | ||
| 5 | +# Preamble | ||
| 6 | + | ||
| 7 | +Summary: Solr is the search platform from Apache Lucene project. | ||
| 8 | +Name: solr | ||
| 9 | +Version: 4.6.1 | ||
| 10 | +Release: 1 | ||
| 11 | + | ||
| 12 | +License: Apache License, Version 2.0 | ||
| 13 | +Group: Applications/Internet | ||
| 14 | +Source: http://archive.apache.org/dist/lucene/solr/4.6.1/solr-4.6.1.tgz | ||
| 15 | +Patch: solr-4.6.1.patch | ||
| 16 | +URL: http://lucene.apache.org/solr/ | ||
| 17 | +Vendor: The Apache Software Foundation | ||
| 18 | +Requires: java | ||
| 19 | + | ||
| 20 | +%description | ||
| 21 | +SolrTM is the popular, blazing fast open source enterprise search platform from the Apache LuceneTM project. Its major features include powerful full-text search, hit highlighting, faceted search, near real-time indexing, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites. | ||
| 22 | + | ||
| 23 | +# Esta seção prepara o ambiente para a construção do pacote. Pode ser | ||
| 24 | +# entendida como um shell script, e é o local onde podem ser aplicados | ||
| 25 | +# os patches | ||
| 26 | +%prep | ||
| 27 | + | ||
| 28 | +# A macro %setup prepara o ambiente, de forma semelhante aos comandos abaixo: | ||
| 29 | +# rm -rf $RPM_BUILD_DIR/cdp-0.33 | ||
| 30 | +# zcat $RPM_SOURCE_DIR/cdp-0.33.tar.gz | tar vxf - | ||
| 31 | +%setup | ||
| 32 | +%patch -p 1 | ||
| 33 | + | ||
| 34 | +# Esta é a seção responsável pela construção do software. Também é um | ||
| 35 | +# shell script, e não tem macros associadas | ||
| 36 | +%build | ||
| 37 | + | ||
| 38 | +# Seção responsável pela instalação do software. Também é um shell script | ||
| 39 | +%install | ||
| 40 | +mkdir -p %{buildroot}/usr/share/solr | ||
| 41 | +cp -r %{_builddir}/solr-4.6.1/* %{buildroot}/usr/share/solr | ||
| 42 | + | ||
| 43 | +mkdir -p %{buildroot}/usr/share/solr/example/solr | ||
| 44 | +cp -r %{_builddir}/solr-4.6.1/example/webapps/solr.war %{buildroot}/usr/share/solr/example/solr/ | ||
| 45 | + | ||
| 46 | +mkdir -p %{buildroot}/etc/init.d | ||
| 47 | +cp -r %{_builddir}/solr-4.6.1/scripts/solr %{buildroot}/etc/init.d/ | ||
| 48 | + | ||
| 49 | +# Esta seção lista todos os arquivos que fazem parte do pacote: se um | ||
| 50 | +# arquivo não for listado abaixo, não será inserido no pacote. A diretiva | ||
| 51 | +# %doc indica um arquivo de documentação | ||
| 52 | +%files | ||
| 53 | +/usr/share/solr | ||
| 54 | +%attr(755, -, -) /etc/init.d/solr | ||
| 55 | + | ||
| 56 | +%post | ||
| 57 | +chmod u+x /usr/share/solr/start.sh | ||
| 58 | +chkconfig solr on | ||
| 59 | +service solr start | ||
| 60 | + | ||
| 61 | +# Esta seção remove os arquivos que foram criados durante o build | ||
| 62 | +%clean | ||
| 63 | +rm -rf %{buildroot} | ||
| 64 | + |