RPM installation compatibility for non-'-r' groupadd(8)/useradd(8).
[captive.git] / captive.spec.in
1 # $Id$
2 # rpm package description file for building
3 # Copyright (C) 2002-2003 Jan Kratochvil <project-captive@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 # Temporary cludge before full 'devel' package gets deployed
20 %define _unpackaged_files_terminate_build 0
21
22 Summary: Microsoft Windows platform filesystem access.
23 Name: @PACKAGE@
24 %define release 0
25 Version: @VERSION@
26 Release: %{release}
27 Group: System Environment/Base
28 Packager: Jan Kratochvil <project-captive@jankratochvil.net>
29 Source: http://www.jankratochvil.net/project/captive/dist/@PACKAGE@-@VERSION@.tar.gz
30 Copyright: GPL
31 BuildRoot: /var/tmp/@PACKAGE@-@VERSION@-%{release}-root
32 BuildRequires: ORBit2-devel
33 Requires: ORBit2
34 # Due to --with-orbit-line=linc
35 Conflicts: ORBit2 >= 2.7.0
36 BuildRequires: openssl-devel
37 Requires: openssl
38 BuildRequires: gnome-vfs2-devel
39 Requires: gnome-vfs2
40 BuildRequires: libxml2-devel
41 Requires: libxml2
42 BuildRequires: popt
43 Requires: popt
44 BuildRequires: glib2-devel
45 Requires: glib2
46 BuildRequires: readline-devel
47 Requires: readline
48 BuildRequires: gcc >= 3.0
49
50 %description
51 Existing binary Microsoft Windows file system drivers were exploited
52 for accessing drives with possibly proprietary file system data structures.
53 Open file system API is provided to access these file system drivers.
54 Microsoft Windows system components required by these drivers
55 were analyzed and successfuly emulated in the GNU/Linux operating system.
56
57 The implementation allows applications running under the GNU/Linux operating
58 system to access NTFS drives. File system driver compatibility with VFAT,
59 ISO9660 and EXT2 is also provided.
60
61 %package lufs
62 Summary: LUFS module for Microsoft Windows platform filesystem access.
63 Group: System Environment/Base
64 Requires: captive = %{PACKAGE_VERSION}
65 BuildRequires: lufs >= 0.9.6-1captive
66 Requires: lufs >= 0.9.6-1captive
67
68 %description lufs
69 LUFS is a hybrid userspace filesystem framework.
70
71 Package provides LUFS filesystem module to access Microsoft Windows platform
72 filesystems such as NTFS. Use filesystem type 'captive-ntfs' for NTFS disks.
73
74 %package install
75 Summary: Instant installer for Microsoft Windows platform filesystem access.
76 Group: System Environment/Base
77 Requires: captive-lufs = %{PACKAGE_VERSION}
78 # Versions before 1.8.0 were too buggy
79 BuildRequires: ntfsprogs-devel >= 1.8.0
80 # 'PreReq' needed for Mandrake-9.1 otherwise '%preun install' fails
81 # during 'rpm -e ntfsprogs captive-install':
82 PreReq: ntfsprogs >= 1.8.0
83 Requires: ntfsprogs >= 1.8.0
84 Requires: ntfsprogs-gnomevfs
85 Requires: gnome-vfs-httpcaptive
86 BuildRequires: gnome-vfs2-devel
87 Requires: gnome-vfs2
88 BuildRequires: libgnomeui-devel
89 Requires: libgnomeui
90 BuildRequires: readline-devel
91 Requires: readline
92 BuildRequires: libxml2-devel >= 2.4.29
93 Requires: libxml2 >= 2.4.29
94
95 %description install
96 Package provides easy enough unattended installation of Microsoft Windows
97 platform filesystem access. Installer finds available NTFS partitions and
98 tries to acquire needed Microsoft Windows filesystem driver files.
99
100 You may need to run 'captive-install-acquire' to answer several questions.
101 NTFS disks will become mount(8)able at directories: /mnt/captive-VOLUME_NAME
102
103 #% %package devel
104 #% Summary: Microsoft Windows platform filesystem access development support.
105 #% Group: Development/System
106 #% Requires: surprise = %{PACKAGE_VERSION}
107 #% 
108 #% %description devel
109 #% Development package containing libraries for static linking together with
110 #% header files needed for any linking.
111 #% 
112 #% Microsoft Windows platform filesystem access.
113 #% TODO
114
115 %prep
116 %setup
117
118 %build
119 # Never disable debug for captive, see FAQ
120 #       "How to check valid input arguments? Invalid processing state assumptions?"
121 %configure \
122                 --enable-shared --disable-static \
123                 --with-readline \
124                 --disable-bug-replay \
125                 --enable-lufs \
126                 --enable-install-pkg \
127                 --enable-sandbox-setuid=@PACKAGE@ \
128                 --enable-sandbox-setgid=@PACKAGE@ \
129                 --enable-sandbox-chroot=%{_var}/lib/@PACKAGE@ \
130                 --enable-man-pages \
131                 --enable-sbin-mountdir=/sbin \
132                 --enable-sbin-mount-fs=ntfs:fastfat:cdfs:ext2fsd \
133                 --disable-gtk-doc \
134                 --with-orbit-line=linc
135 make
136
137 %install
138 make DESTDIR=$RPM_BUILD_ROOT install-strip
139
140 %clean
141 rm -rf $RPM_BUILD_ROOT
142
143 %post
144 /sbin/ldconfig
145 /usr/sbin/groupadd -r captive 2>/dev/null || \
146    /usr/sbin/groupadd captive 2>/dev/null || \
147          true
148 /usr/sbin/useradd -r -c "Captive Sandbox" -s /sbin/nologin -g captive -d %{_var}/lib/@PACKAGE@ captive 2>/dev/null || \
149    /usr/sbin/useradd -c "Captive Sandbox" -s /sbin/nologin -g captive -d %{_var}/lib/@PACKAGE@ captive 2>/dev/null || \
150    true
151
152 %postun
153 /sbin/ldconfig
154 # Remove stale sandbox chroot directories owned by 'captive.captive':
155 rm -rf %{_var}/lib/@PACKAGE@/s-*
156 rm -rf %{_var}/lib/@PACKAGE@/tmp/*
157
158 %files
159 %defattr(-,root,root)
160 %doc README NEWS AUTHORS THANKS TODO
161 %{_libdir}/lib@PACKAGE@-@VERSION@.so
162 %attr(644,root,root) %{_mandir}/man?/@PACKAGE@.*
163 %{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs-@VERSION@.so
164 %{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs.so
165 %{_bindir}/@PACKAGE@-cmdline
166 %attr(644,root,root) %{_mandir}/man?/@PACKAGE@-cmdline.*
167 %attr(4755,root,root) %{_sbindir}/@PACKAGE@-sandbox-server
168 %attr(644,root,root) %{_mandir}/man?/@PACKAGE@-sandbox-server.*
169 %config %{_sysconfdir}/gnome-vfs-2.0/modules/@PACKAGE@.conf
170 %{_datadir}/locale/*/LC_MESSAGES/@PACKAGE@.mo
171 %attr(755,root,root) %{_var}/lib/@PACKAGE@
172 %attr(1777,root,root) %{_var}/lib/@PACKAGE@/tmp
173 %attr(644,root,root) %{_var}/lib/@PACKAGE@/*.sys
174
175 %files lufs
176 %defattr(-,root,root)
177 %{_libdir}/liblufs-@PACKAGE@fs-@VERSION@.so
178 %{_libdir}/liblufs-@PACKAGE@fs.so
179 %attr(644,root,root) %{_mandir}/man?/lufs-@PACKAGE@fs.*
180 /sbin/mount.@PACKAGE@
181 /sbin/mount.@PACKAGE@-*
182 %attr(644,root,root) %{_mandir}/man?/mount.@PACKAGE@.*
183
184 %post install
185 %{_sbindir}/captive-install-fstab --add
186 %{_sbindir}/captive-install-acquire --text --scan-disks-quick
187
188 %preun install
189 %{_sbindir}/captive-install-fstab --remove
190
191 %files install
192 %defattr(-,root,root)
193 %config %{_sysconfdir}/w32-mod-id.captivemodid.xml
194 %{_sbindir}/captive-install-fstab
195 %attr(644,root,root) %{_mandir}/man?/captive-install-fstab.*
196 %{_sbindir}/captive-install-acquire
197 %attr(644,root,root) %{_mandir}/man?/captive-install-acquire.*
198
199 # %files devel
200 # %defattr(-,root,root)
201 # %doc ChangeLog
202 # /usr/include/@PACKAGE@
203 # /usr/share/aclocal/*
204 # %{_libdir}/gnome-vfs-2.0/modules/libcaptive-gnomevfs.la
205 # /usr/lib/*.a
206 # /usr/lib/*.la
207 # ###for --disable-shared/(--enable-static-link disable):
208 # /usr/lib/*[a-z].so