]> git.pld-linux.org Git - packages/aspseek.git/blob - aspseek.spec
- sorted BRs
[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):    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.159
23 BuildRequires:  zlib-devel
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/sbin/useradd
26 Requires(postun):       /usr/sbin/userdel
27 Requires(post): fileutils
28 Requires(post,preun):   /sbin/chkconfig
29 Requires(post,postun):  /sbin/ldconfig
30 Requires:       webserver
31 Requires:       %{name}-db-%{version}
32 Provides:       user(aspseek)
33 Obsoletes:      swish++
34 Obsoletes:      mnogosearch
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)
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
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):    Obs³uga MySQL dla ASPSeek
81 Group:          Networking/Utilities
82 Provides:       %{name}-db-%{version}
83 Requires:       %{name} = %{version}
84 Requires(post): /sbin/ldconfig
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
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):    Modu³ Apache: Silnik wyszukiwania ASPSeek
97 Group:          Networking/Daemons
98 PreReq:         aspseek
99 Requires(post,preun):   %{apxs}
100 Requires(post,preun):   grep
101 Requires(preun):        fileutils
102 Requires:       apache(EAPI)
103
104 %description -n apache-mod_aspseek
105 ASPSeek Apache module.
106
107 %description -n apache-mod_aspseek -l pl
108 Modu³ Apache ASPSeek.
109
110 %prep
111 %setup -q
112 %patch -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 if [ -n "`/bin/id -u aspseek 2>/dev/null`" ]; then
145         if [ "`/bin/id -u aspseek`" != 50 ]; then
146                 echo "Error: user aspseek doesn't have uid=50. Correct this before installing aspseek." 1>&2
147                 exit 1
148         fi
149 else
150         /usr/sbin/useradd -u 50 -d /srv/aspseek -s /bin/false -c "ASPSEEK User" -g root aspseek 1>&2
151 fi
152
153 %post
154 /sbin/ldconfig
155 /sbin/chkconfig --add %{name}
156 touch /var/log/aspseek.log
157 chown aspseek:root /var/log/aspseek.log
158 # create $HOME if possible, we are not allowed to remove it later
159 if [ ! -d /srv/aspseek ]; then
160         if mkdir /srv/aspseek; then
161                 chown aspseek:root /srv/aspseek
162                 chmod 755 /srv/aspseek
163         fi
164 fi
165
166 %preun
167 if [ "$1" = "0" ]; then
168         if [ -f /var/lock/subsys/%{name} ]; then
169                 /etc/rc.d/init.d/%{name} stop 1>&2
170         fi
171         /sbin/chkconfig --del %{name}
172 fi
173
174 %postun
175 /sbin/ldconfig
176 if [ "$1" = "0" ]; then
177         %userremove aspseek
178 fi
179
180 %post db-mysql
181 /sbin/ldconfig
182 echo "Remember to run %{_sbindir}/aspseek-mysql-postinstall."
183
184 %postun db-mysql -p /sbin/ldconfig
185
186 %post -n apache-mod_aspseek
187 %{apxs} -e -a -n aspseek %{_pkglibdir}/mod_aspseek.so 1>&2
188 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf; then
189         echo "Include /etc/httpd/mod_aspseek.conf" >> /etc/httpd/httpd.conf
190 fi
191 if [ -f /var/lock/subsys/httpd ]; then
192         /etc/rc.d/init.d/httpd restart 1>&2
193 fi
194
195 %preun -n apache-mod_aspseek
196 if [ "$1" = "0" ]; then
197         %{apxs} -e -A -n aspseek %{_pkglibdir}/mod_aspseek.so 1>&2
198         umask 027
199         grep -v "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf > \
200                 /etc/httpd/httpd.conf.tmp
201         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
202         if [ -f /var/lock/subsys/httpd ]; then
203                 /etc/rc.d/init.d/httpd restart 1>&2
204         fi
205 fi
206
207 %files
208 %defattr(644,root,root,755)
209 %doc AUTHOR* FAQ* NEWS* README* RELEASE* THANKS* TODO* doc/*.txt
210 %attr(755,root,root) %{_bindir}/s.cgi
211 %attr(755,root,root) %{_sbindir}/index
212 %attr(755,root,root) %{_sbindir}/searchd
213 %attr(755,root,root) %{_libdir}/libaspseek*.so.*
214 /home/httpd/icons/*.*
215 %{_mandir}/man5/aspseek.conf*
216 %{_mandir}/man5/s*
217 %{_mandir}/man1/*
218 %{_mandir}/man7/*
219 %dir %{_sysconfdir}
220 %{_sysconfdir}/langmap
221 %dir %{_sysconfdir}/sql
222 %{_sysconfdir}/stopwords
223 %{_sysconfdir}/tables
224 %attr(754,root,root) /etc/rc.d/init.d/aspseek
225 %attr(750,aspseek,root) %dir /var/spool/aspseek
226 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
227 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.htm
228 %ghost /var/log/aspseek.log
229
230 %files db-mysql
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_sbindir}/aspseek-mysql-postinstall
233 %attr(755,root,root) %{_libdir}/libmysql*.so*
234 %{_sysconfdir}/sql/mysql
235 %{_mandir}/man5/aspseek-sql*
236
237 %files -n apache-mod_aspseek
238 %defattr(644,root,root,755)
239 %doc README.APACHE_MODULE
240 %attr(755,root,root) %{_pkglibdir}/*.so
241 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/httpd/mod_*.conf
This page took 0.076867 seconds and 3 git commands to generate.