]> git.pld-linux.org Git - packages/aspseek.git/blob - aspseek.spec
- more things done
[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         --localstatedir=/var/spool
106 %{__make}
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT{/etc/httpd,/home/httpd/icons,rc.d/init.d}
111 install -d $RPM_BUILD_ROOT/var/{spool/aspseek,log}
112
113 %{__make} install \
114         DESTDIR=$RPM_BUILD_ROOT
115
116 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/img/* $RPM_BUILD_ROOT/home/httpd/icons
117 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/mod_aspseek.conf
118 sed -e "s#/img/#/icons/#g" $RPM_BUILD_ROOT%{_sysconfdir}/s.htm-dist > \
119         $RPM_BUILD_ROOT%{_sysconfdir}/s.htm
120 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
121 touch $RPM_BUILD_ROOT/var/log/aspseek.log
122
123 gzip -9nf AUTHOR* FAQ* NEWS* README* RELEASE* THANKS* TODO* doc/*.txt
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %pre
129 if [ -n "`id -u aspseek 2>/dev/null`" ]; then
130         if [ "`id -u aspseek`" != "50" ]; then
131           echo "Warning: user aspseek haven't uid=50. Correct this before installing aspseek" 1>&2
132           exit 1
133         fi
134 else
135         /usr/sbin/useradd -u 50 -r -d /home/services/aspseek -s /bin/false -c "ASPSEEK User" -g root aspseek 1>&2
136 fi
137
138 %post
139 /sbin/ldconfig
140 /sbin/chkconfig --add httpd
141 touch /var/log/aspseek.log && chown aspseek.root /var/log/aspseek.log
142
143 %preun
144 if [ "$1" = "0" ]; then
145         if [ -f /var/lock/subsys/%{name} ]; then
146                 /etc/rc.d/init.d/%{name} stop 1>&2
147         fi
148         /sbin/chkconfig --del %{name}
149 fi
150
151 %postun
152 /sbin/ldconfig
153 if [ "$1" = "0" ]; then
154         /usr/sbin/userdel aspseek
155 fi
156
157 %post db-mysql
158 /sbin/ldconfig
159 echo "Remember to run: %{_sbindir}/aspseek-mysql-postinstall"
160
161 %postun db-mysql -p /sbin/ldconfig
162
163 %post -n apache-mod_aspseek
164 %{_sbindir}/apxs -e -a -n aspseek %{_pkglibdir}/mod_aspseek.so 1>&2
165 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf; then
166         echo "Include /etc/httpd/mod_aspseek.conf" >> /etc/httpd/httpd.conf
167 fi
168 if [ -f /var/lock/subsys/httpd ]; then
169         /etc/rc.d/init.d/httpd restart 1>&2
170 fi
171
172 %preun -n apache-mod_aspseek
173 if [ "$1" = "0" ]; then
174         %{_sbindir}/apxs -e -A -n aspseek %{_pkglibdir}/mod_aspseek.so 1>&2
175         grep -v "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf > \
176                 /etc/httpd/httpd.conf.tmp
177         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
178         if [ -f /var/lock/subsys/httpd ]; then
179                 /etc/rc.d/init.d/httpd restart 1>&2
180         fi
181 fi
182
183 %files
184 %defattr(644,root,root,755)
185 %doc AUTHOR* FAQ* NEWS* README.gz RELEASE* THANKS* TODO* doc/*.gz
186 %attr(755,root,root) %{_bindir}/s.cgi
187 %attr(755,root,root) %{_sbindir}/index
188 %attr(755,root,root) %{_sbindir}/searchd
189 %attr(755,root,root) %{_libdir}/libaspseek*.so.*
190 /home/httpd/icons/*.*
191 %{_mandir}/man5/aspseek.conf*
192 %{_mandir}/man5/s*
193 %{_mandir}/man1/*
194 %{_mandir}/man7/*
195 %dir %{_sysconfdir}
196 %{_sysconfdir}/langmap
197 %dir %{_sysconfdir}/sql
198 %{_sysconfdir}/stopwords
199 %{_sysconfdir}/tables
200 %attr(750,aspseek,root) %dir /var/spool/aspseek
201 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
202 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.htm
203 %ghost /var/log/aspseek.log
204
205 %files db-mysql
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_sbindir}/aspseek-mysql-postinstall
208 %attr(755,root,root) %{_libdir}/libmysql*.so*
209 %{_sysconfdir}/sql/mysql
210 %{_mandir}/man5/aspseek-sql*
211
212 %files -n apache-mod_aspseek
213 %defattr(644,root,root,755)
214 %doc README.APACHE_MODULE.gz
215 %attr(755,root,root) %{_pkglibdir}/*.so
216 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/httpd/mod_*.conf
This page took 0.61192 seconds and 3 git commands to generate.