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