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