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