]> git.pld-linux.org Git - packages/aspseek.git/blob - aspseek.spec
- massive change: BR openssl-devel >= 0.9.7d
[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:  openssl-devel >= 0.9.7d
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 /srv/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
155 chown aspseek:root /var/log/aspseek.log
156
157 %preun
158 if [ "$1" = "0" ]; then
159         if [ -f /var/lock/subsys/%{name} ]; then
160                 /etc/rc.d/init.d/%{name} stop 1>&2
161         fi
162         /sbin/chkconfig --del %{name}
163 fi
164
165 %postun
166 /sbin/ldconfig
167 if [ "$1" = "0" ]; then
168         /usr/sbin/userdel 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 if [ -f /var/lock/subsys/httpd ]; then
183         /etc/rc.d/init.d/httpd restart 1>&2
184 fi
185
186 %preun -n apache-mod_aspseek
187 if [ "$1" = "0" ]; then
188         %{apxs} -e -A -n aspseek %{_pkglibdir}/mod_aspseek.so 1>&2
189         umask 027
190         grep -v "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf > \
191                 /etc/httpd/httpd.conf.tmp
192         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
193         if [ -f /var/lock/subsys/httpd ]; then
194                 /etc/rc.d/init.d/httpd restart 1>&2
195         fi
196 fi
197
198 %files
199 %defattr(644,root,root,755)
200 %doc AUTHOR* FAQ* NEWS* README* RELEASE* THANKS* TODO* doc/*.txt
201 %attr(755,root,root) %{_bindir}/s.cgi
202 %attr(755,root,root) %{_sbindir}/index
203 %attr(755,root,root) %{_sbindir}/searchd
204 %attr(755,root,root) %{_libdir}/libaspseek*.so.*
205 /home/httpd/icons/*.*
206 %{_mandir}/man5/aspseek.conf*
207 %{_mandir}/man5/s*
208 %{_mandir}/man1/*
209 %{_mandir}/man7/*
210 %dir %{_sysconfdir}
211 %{_sysconfdir}/langmap
212 %dir %{_sysconfdir}/sql
213 %{_sysconfdir}/stopwords
214 %{_sysconfdir}/tables
215 %attr(754,root,root) /etc/rc.d/init.d/aspseek
216 %attr(750,aspseek,root) %dir /var/spool/aspseek
217 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
218 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.htm
219 %ghost /var/log/aspseek.log
220
221 %files db-mysql
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_sbindir}/aspseek-mysql-postinstall
224 %attr(755,root,root) %{_libdir}/libmysql*.so*
225 %{_sysconfdir}/sql/mysql
226 %{_mandir}/man5/aspseek-sql*
227
228 %files -n apache-mod_aspseek
229 %defattr(644,root,root,755)
230 %doc README.APACHE_MODULE
231 %attr(755,root,root) %{_pkglibdir}/*.so
232 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/httpd/mod_*.conf
This page took 0.125367 seconds and 3 git commands to generate.