Fix build error
[platform/upstream/man-db.git] / packaging / man-db.spec
1 Name:           man-db
2 Version:        2.9.4
3 Release:        1
4 License:        GPL-2.0+
5 Summary:        A set of documentation tools: man, apropos and whatis
6 Url:            http://man-db.nongnu.org/
7 Group:          System/Base
8 Source:         %{name}-%{version}.tar.gz
9 Source2:        gnulib.tar.gz
10 Source1001:     man-db.manifest
11
12 BuildRequires:  flex
13 BuildRequires:  db4-devel
14 BuildRequires:  gettext
15 BuildRequires:  groff
16 BuildRequires:  pkgconfig(libpipeline)
17
18 Requires:       bzip2
19 Requires:       coreutils
20 Requires:       groff >= 1.18
21 Requires:       gzip
22 Requires:       less
23 Requires:       lzma
24 Provides:       man
25
26 %description
27 The man package includes three tools for finding information and/or
28 documentation about your Linux system: man, apropos, and whatis. The
29 man system formats and displays on-line manual pages about commands or
30 functions on your system. Apropos searches the whatis database
31 (containing short descriptions of system commands) for a string.
32 Whatis searches its own database for a complete word.
33
34 The man package should be installed on your system because it is the
35 primary way to find documentation on a Linux system.
36
37 %prep
38 %setup -q
39 cp %{SOURCE1001} .
40
41 %build
42 export CFLAGS+=" -fPIC"
43 export LDFLAGS+=" -pie"
44
45 tar -xf %{SOURCE2}
46 ./bootstrap --no-git --gnulib-srcdir=gnulib
47 chmod +x ./configure
48 %configure --libdir=%{_libdir} \
49         --libexecdir=%{_libdir} \
50         --sysconfdir=%{_sysconfdir} \
51         --with-db=db4 \
52         --disable-setuid \
53         --enable-mandirs=GNU \
54         --enable-mb-groff \
55         --with-sections="1 n l 8 3 0 2 5 4 9 6 7"
56
57 make %{?_smp_mflags}
58
59 %install
60 %make_install
61
62 # remove service files
63 rm -f %{buildroot}/lib/systemd/system/man-db.*
64 rm -f %{buildroot}/usr/lib/tmpfiles.d/man-db.conf
65
66 # remove manual files
67 rm -f %{buildroot}/%{_datadir}/doc/%{name}/%{name}-manual.*
68
69 %find_lang %{name} --with-man --all-name
70 %lang_package
71
72 %docs_package
73
74 %files
75 %manifest %{name}.manifest
76 %license docs/COPYING
77 %config(noreplace) %{_sysconfdir}/man_db.conf
78 %{_bindir}/apropos
79 %{_bindir}/catman
80 %{_bindir}/lexgrog
81 %{_bindir}/man
82 %{_bindir}/mandb
83 %{_bindir}/manpath
84 %{_bindir}/man-recode
85 %{_bindir}/whatis
86 %{_sbindir}/accessdb
87 %{_libdir}/man-db/libman-*.so
88 %{_libdir}/man-db/libman.so
89 %{_libdir}/man-db/libmandb-*.so
90 %{_libdir}/man-db/libmandb.so
91 %{_libdir}/man-db/globbing
92 %{_libdir}/man-db/manconv
93 %{_libdir}/man-db/zsoelim