Index gzip-compressed SVG files
[xapian.git] / xapian-applications / omega / xapian-omega.spec.in
blobbb97f3a2e6fc4083fa168f903bd46084f9708ae8
1 # RedHat-style .spec file for Xapian
2 # @configure_input@
3 %define contentdir /var/lib
4 %define logdir /var/log
6 Summary: A CGI search frontend and indexers built on Xapian
7 Name: xapian-omega
8 Version: @VERSION@
9 Release: 1
10 License: GPL
11 Vendor: xapian.org
12 Group: Applications/Internet
13 URL: https://xapian.org/
14 Requires: xapian-core-libs >= %{version}, webserver
15 BuildRequires: xapian-core-devel = %{version}
16 BuildRequires: autoconf automake libtool
17 Source0: https://oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz
18 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
20 %description
21 Omega is a CGI application which uses the Xapian Information Retrieval
22 library to index and search collections of documents.
24 %prep
25 %setup -q
27 %build
28 # As of 1.1.0, Xapian uses libtool 2.2.x which allows us to override libtool's
29 # sometimes conservative take on which directories are in the default dynamic
30 # linker search path, so we no longer incorrectly try to set rpath for
31 # /usr/lib64. Hence there's no longer a need to run "autoreconf --force" here
32 # and it's better not to as it avoids having to cope with incompatibilities
33 # with older versions of the autotools which older distros have.
34 #autoreconf --force
35 %configure
36 make
38 %install
39 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
40 mkdir -p %{buildroot}
41 %makeinstall
42 # CGI application
43 mkdir -p %{buildroot}/var/www/cgi-bin/
44 mv %{buildroot}%{_libdir}/xapian-omega/bin/omega %{buildroot}/var/www/cgi-bin
45 # Create /var directories
46 mkdir -p %{buildroot}%{contentdir}/omega/data
47 mkdir -p %{buildroot}%{contentdir}/omega/cdb
48 mkdir -p %{buildroot}%{logdir}/omega
49 # Default templates
50 mkdir -p %{buildroot}%{contentdir}/omega/templates
51 cp -r templates/* %{buildroot}%{contentdir}/omega/templates/
52 # Images
53 mkdir -p %{buildroot}/var/www/icons/omega
54 cp -r images/* %{buildroot}/var/www/icons/omega/
55 # Configuration file
56 mkdir -p %{buildroot}/etc
57 install -D -m644 omega.conf %{buildroot}/etc/omega.conf
58 # Move the scripts to the right place
59 mv %{buildroot}/usr/share/omega %{buildroot}%{_datadir}/%{name}
60 # Move the docs to the right place
61 mv %{buildroot}/usr/share/doc/xapian-omega %{buildroot}/usr/share/doc/%{name}-%{version}
62 cp AUTHORS ChangeLog COPYING NEWS README TODO %{buildroot}/usr/share/doc/%{name}-%{version}
64 %clean
65 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
67 %files
68 %defattr(-, root, root)
69 %{_bindir}/dbi2omega
70 %{_bindir}/omindex
71 %{_bindir}/scriptindex
72 %{_bindir}/htdig2omega
73 %{_bindir}/mbox2omega
74 # On 64-bit, this goes to /usr/lib64/...
75 # FIXME: Sort this out:
76 # http://thread.gmane.org/gmane.comp.search.xapian.general/8678
77 %{_libdir}/xapian-omega/bin/outlookmsg2html
78 %{contentdir}/omega
79 %{logdir}/omega
80 /var/www/cgi-bin/omega
81 /var/www/icons/omega
82 %{_datadir}/%{name}
83 %config(noreplace) /etc/omega.conf
84 %doc %{_datadir}/doc/%{name}-%{version}
85 # man pages may be gzipped, hence the trailing wildcard.
86 %{_mandir}/man1/omindex.1*
87 %{_mandir}/man1/scriptindex.1*