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