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