File: xapian-omega.spec.in

package info (click to toggle)
xapian-omega 1.0.7-3+lenny2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,424 kB
  • ctags: 744
  • sloc: sh: 9,112; cpp: 7,954; makefile: 245; perl: 119
file content (83 lines) | stat: -rw-r--r-- 2,685 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# RedHat-style .spec file for Xapian
# @configure_input@
%define contentdir /var/lib
%define logdir /var/log

Summary: A CGI search frontend and indexers built on Xapian
Name: xapian-omega
Version: @VERSION@
Release: 1
License: GPL
Vendor: xapian.org
Group: Applications/Internet
URL: http://xapian.org/
# FIXME: once we reach 1.0 "=" should become ">="
Requires: xapian-core-libs = %{version}, webserver
BuildRequires: xapian-core-devel = %{version}
BuildRequires: autoconf automake libtool
Source0: http://oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
Omega is a CGI application which uses the Xapian Information Retrieval
library to index and search collections of documents.

%prep
%setup -q

%build
# FC6 (at least) has a patched libtool which knows not to set rpath for
# /usr/lib64, which upstream libtool fails to do currently.  We can drop
# this "autoreconf --force" and the "BuildRequires:" for the autotools
# once upstream libtool is fixed.  Note: this overwrites INSTALL, but
# that doesn't matter here as we don't package it.
autoreconf --force
%configure
make

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
mkdir -p %{buildroot}
%makeinstall
# CGI application
mkdir -p %{buildroot}/var/www/cgi-bin/
mv %{buildroot}%{_libdir}/xapian-omega/bin/omega %{buildroot}/var/www/cgi-bin
# Create /var directories
mkdir -p %{buildroot}%{contentdir}/omega/data
mkdir -p %{buildroot}%{contentdir}/omega/cdb
mkdir -p %{buildroot}%{logdir}/omega
# Default templates
mkdir -p %{buildroot}%{contentdir}/omega/templates
cp -r templates/* %{buildroot}%{contentdir}/omega/templates/
# Images
mkdir -p %{buildroot}/var/www/icons/omega
cp -r images/* %{buildroot}/var/www/icons/omega/
# Configuration file
mkdir -p %{buildroot}/etc
install -D -m644 omega.conf %{buildroot}/etc/omega.conf
# Move the scripts to the right place
mv %{buildroot}/usr/share/omega %{buildroot}%{_datadir}/%{name}
# Move the docs to the right place
mv %{buildroot}/usr/share/doc/xapian-omega %{buildroot}/usr/share/doc/%{name}-%{version}
cp AUTHORS ChangeLog COPYING NEWS README TODO %{buildroot}/usr/share/doc/%{name}-%{version}

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-, root, root)
%{_bindir}/dbi2omega
%{_bindir}/omindex
%{_bindir}/scriptindex
%{_bindir}/htdig2omega
%{_bindir}/mbox2omega
%{contentdir}/omega
%{logdir}/omega
/var/www/cgi-bin/omega
/var/www/icons/omega
%{_datadir}/%{name}
%config(noreplace) /etc/omega.conf
%doc %{_datadir}/doc/%{name}-%{version}
# man pages may be gzipped, hence the trailing wildcard.
%{_mandir}/man1/omindex.1*
%{_mandir}/man1/scriptindex.1*