]> git.pld-linux.org Git - packages/aspseek.git/blob - aspseek.spec
- tabs in preamble
[packages/aspseek.git] / aspseek.spec
1 # TODO:
2 #       - split into indexer and client?
3 #       - running indexer from cron?
4 %define         apxs            /usr/sbin/apxs
5 Summary:        Advanced Internet search engine
6 Summary(pl.UTF-8):      Silnik zaawansowanej wyszukiwarki Internetowej
7 Name:           aspseek
8 Version:        1.2.8
9 Release:        7
10 License:        GPL
11 Group:          Networking/Utilities
12 Source0:        http://www.aspseek.org/pkg/src/1.2.8/%{name}-%{version}.tar.gz
13 # Source0-md5:  0660b6b0d45d37c7a53c7e1c40cae002
14 Source1:        %{name}-mod_aspseek.conf
15 Source2:        %{name}.init
16 Patch0:         %{name}-types.patch
17 URL:            http://www.aspseek.org/
18 BuildRequires:  apache(EAPI)-devel
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  mysql-devel
21 BuildRequires:  openssl-devel >= 0.9.7d
22 BuildRequires:  rpmbuild(macros) >= 1.268
23 BuildRequires:  zlib-devel
24 Requires(post): fileutils
25 Requires(post,postun):  /sbin/ldconfig
26 Requires(post,preun):   /sbin/chkconfig
27 Requires(postun):       /usr/sbin/userdel
28 Requires(pre):  /bin/id
29 Requires(pre):  /usr/sbin/useradd
30 Requires:       %{name}-db-%{version}
31 Requires:       webserver
32 Provides:       user(aspseek)
33 Obsoletes:      mnogosearch
34 Obsoletes:      swish++
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _sysconfdir     /etc/%{name}
38 %define         _bindir         /home/httpd/cgi-bin
39 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
40
41 %description
42 ASPSeek is an Internet search engine, written in C++ using the STL
43 library. It consists of an indexing robot, a search daemon, and a CGI
44 search frontend. It can index as many as a few million URLs and search
45 for words and phrases, use wildcards, and do a Boolean search. Search
46 results can be limited to time period given, site or Web space (set of
47 sites) and sorted by relevance (some cool techniques are used) or
48 date.
49
50 ASPSeek is optimized for multiple sites (threaded index, async DNS
51 lookups, grouping results by site, Web spaces), but can be used for
52 searching one site as well. ASPSeek can work with multiple
53 languages/encodings at once (including multibyte encodings such as
54 Chinese) due to Unicode storage mode. Other features include stopwords
55 and ispell support, a charset and language guesser, HTML templates for
56 search results, excerpts, and query words highlighting.
57
58 %description -l pl.UTF-8
59 ASPSeek jest silnikiem wyszukiwarki Internetowej, napisany w C++ z
60 użyciem biblioteki STL. Zawiera robota indeksującego, daemon
61 wyszukujący oraz interfejs w postaci skryptu CGI. ASPSeek może
62 indeksować miliony adresów oraz wyszukiwać słowa oraz zwroty, używać
63 znaków globalnych jak również stosować operatory logiczne. Rezultaty
64 wyszukiwania mogą być ograniczane do określonego okresu czasu,
65 serwera, zbioru serwerów oraz sortowane wg. aktualności (określane za
66 pomocą pewnych specjalnych technik) lub daty.
67
68 ASPSeek jest zoptymalizowany dla wielu serwerów (wątkowane
69 indeksowanie, asynchroniczne zapytania DNS, grupowanie rezultatów wg
70 serwera, grupy serwerów), ale może być również używany do obsługi
71 jednego serwera. ASPSeek może pracować z wieloma językami/kodowaniami
72 równocześnie (włączając w to wielobajtowe kodowania używane np. dla
73 języka Chińskiego) dzięki trybowi zapisu w Unikodzie. Inne możliwości
74 to blokowanie określonych słów, wsparcie dla ispella, zgadywarka
75 kodowania oraz języka, wzorce HTML dla rezultatów wyszukiwania,
76 podświetlanie wyszukiwanych słów.
77
78 %package db-mysql
79 Summary:        MySQL backend driver for ASPSeek
80 Summary(pl.UTF-8):      Obsługa MySQL dla ASPSeek
81 Group:          Networking/Utilities
82 Requires(post): /sbin/ldconfig
83 Requires:       %{name} = %{version}-%{release}
84 Provides:       %{name}-db-%{version}
85
86 %description db-mysql
87 This driver acts as a database backend for ASPSeek, so ASPSeek will
88 store its data in MySQL database.
89
90 %description db-mysql -l pl.UTF-8
91 Ten driver działa jako bazodanowy backend dla ASPSeek, tak, że ASPSeek
92 będzie zapisywał swoje dane w bazie MySQL.
93
94 %package -n apache-mod_aspseek
95 Summary:        Apache module: ASPSeek search engine
96 Summary(pl.UTF-8):      Moduł Apache: Silnik wyszukiwania ASPSeek
97 Group:          Networking/Daemons
98 Requires(post,preun):   %{apxs}
99 Requires(post,preun):   grep
100 Requires(preun):        fileutils
101 Requires:       apache(EAPI)
102 Requires:       aspseek
103
104 %description -n apache-mod_aspseek
105 ASPSeek Apache module.
106
107 %description -n apache-mod_aspseek -l pl.UTF-8
108 Moduł Apache ASPSeek.
109
110 %prep
111 %setup -q
112 %patch0 -p1
113
114 %build
115 %configure2_13 \
116         --enable-charset-guesser \
117         --enable-font-size \
118         --enable-apache-module \
119         --with-openssl \
120         --with-mysql \
121         --enable-unicode \
122         --localstatedir=/var/spool
123 %{__make}
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{/etc/{httpd,rc.d/init.d},/home/httpd/icons}
128 install -d $RPM_BUILD_ROOT/var/{spool/aspseek,log}
129
130 %{__make} install \
131         DESTDIR=$RPM_BUILD_ROOT
132
133 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/img/* $RPM_BUILD_ROOT/home/httpd/icons
134 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/mod_aspseek.conf
135 sed -e "s#/img/#/icons/#g" $RPM_BUILD_ROOT%{_sysconfdir}/s.htm-dist > \
136         $RPM_BUILD_ROOT%{_sysconfdir}/s.htm
137 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
138 touch $RPM_BUILD_ROOT/var/log/aspseek.log
139
140 %clean
141 rm -rf $RPM_BUILD_ROOT
142
143 %pre
144 %useradd -u 50 -d /srv/aspseek -s /bin/false -c "ASPSEEK User" -g root aspseek
145
146 %post
147 /sbin/ldconfig
148 /sbin/chkconfig --add %{name}
149 touch /var/log/aspseek.log
150 chown aspseek:root /var/log/aspseek.log
151 # create $HOME if possible, we are not allowed to remove it later
152 if [ ! -d /srv/aspseek ]; then
153         if mkdir /srv/aspseek; then
154                 chown aspseek:root /srv/aspseek
155                 chmod 755 /srv/aspseek
156         fi
157 fi
158
159 %preun
160 if [ "$1" = "0" ]; then
161         %service %{name} stop
162         /sbin/chkconfig --del %{name}
163 fi
164
165 %postun
166 /sbin/ldconfig
167 if [ "$1" = "0" ]; then
168         %userremove aspseek
169 fi
170
171 %post db-mysql
172 /sbin/ldconfig
173 echo "Remember to run %{_sbindir}/aspseek-mysql-postinstall."
174
175 %postun db-mysql -p /sbin/ldconfig
176
177 %post -n apache-mod_aspseek
178 %{apxs} -e -a -n aspseek %{_pkglibdir}/mod_aspseek.so 1>&2
179 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf; then
180         echo "Include /etc/httpd/mod_aspseek.conf" >> /etc/httpd/httpd.conf
181 fi
182 %service -q httpd restart
183
184 %preun -n apache-mod_aspseek
185 if [ "$1" = "0" ]; then
186         %{apxs} -e -A -n aspseek %{_pkglibdir}/mod_aspseek.so 1>&2
187         umask 027
188         grep -v "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf > \
189                 /etc/httpd/httpd.conf.tmp
190         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
191         %service -q httpd restart
192 fi
193
194 %files
195 %defattr(644,root,root,755)
196 %doc AUTHOR* FAQ* NEWS* README* RELEASE* THANKS* TODO* doc/*.txt
197 %attr(755,root,root) %{_bindir}/s.cgi
198 %attr(755,root,root) %{_sbindir}/index
199 %attr(755,root,root) %{_sbindir}/searchd
200 %attr(755,root,root) %{_libdir}/libaspseek*.so.*
201 /home/httpd/icons/*.*
202 %{_mandir}/man5/aspseek.conf*
203 %{_mandir}/man5/s*
204 %{_mandir}/man1/*
205 %{_mandir}/man7/*
206 %dir %{_sysconfdir}
207 %{_sysconfdir}/langmap
208 %dir %{_sysconfdir}/sql
209 %{_sysconfdir}/stopwords
210 %{_sysconfdir}/tables
211 %attr(754,root,root) /etc/rc.d/init.d/aspseek
212 %attr(750,aspseek,root) %dir /var/spool/aspseek
213 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
214 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.htm
215 %ghost /var/log/aspseek.log
216
217 %files db-mysql
218 %defattr(644,root,root,755)
219 %attr(755,root,root) %{_sbindir}/aspseek-mysql-postinstall
220 %attr(755,root,root) %{_libdir}/libmysql*.so*
221 %{_sysconfdir}/sql/mysql
222 %{_mandir}/man5/aspseek-sql*
223
224 %files -n apache-mod_aspseek
225 %defattr(644,root,root,755)
226 %doc README.APACHE_MODULE
227 %attr(755,root,root) %{_pkglibdir}/*.so
228 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/mod_*.conf
This page took 0.093788 seconds and 3 git commands to generate.