+Remove stale sandbox chroot directories owned by 'captive.captive'
[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/@PACKAGE@-@VERSION@.tar.gz
30 Copyright: GPL
31 BuildRoot: /var/tmp/@PACKAGE@-@VERSION@-%{release}-root
32 BuildRequires: ORBit2-devel
33 Requires: ORBit2
34 BuildRequires: openssl-devel
35 Requires: openssl
36 BuildRequires: gnome-vfs2-devel
37 Requires: gnome-vfs2
38 BuildRequires: libxml2-devel
39 Requires: libxml2
40 BuildRequires: popt
41 Requires: popt
42 BuildRequires: glib2-devel
43 Requires: glib2
44 BuildRequires: readline-devel
45 Requires: readline
46 BuildRequires: gcc >= 3.0
47
48 %description
49 Existing binary Microsoft Windows file system drivers were exploited
50 for accessing drives with possibly proprietary file system data structures.
51 Open file system API is provided to access these file system drivers.
52 Microsoft Windows system components required by these drivers
53 were analyzed and successfuly emulated in the GNU/Linux operating system.
54
55 The implementation allows applications running under the GNU/Linux operating
56 system to access NTFS drives. File system driver compatibility with VFAT,
57 ISO9660 and EXT2 is also provided.
58
59 %package lufs
60 Summary: LUFS module for Microsoft Windows platform filesystem access.
61 Group: System Environment/Base
62 Requires: captive = %{PACKAGE_VERSION}
63 BuildRequires: lufs >= 0.9.6-1captive
64 Requires: lufs >= 0.9.6-1captive
65
66 %description lufs
67 LUFS is a hybrid userspace filesystem framework.
68
69 Package provides LUFS filesystem module to access Microsoft Windows platform
70 filesystems such as NTFS.
71
72 %package install
73 Summary: Instant installer for Microsoft Windows platform filesystem access.
74 Group: System Environment/Base
75 Requires: captive-lufs = %{PACKAGE_VERSION}
76 BuildRequires: ntfsprogs-devel
77 # 'PreReq' needed for Mandrake-9.1 otherwise '%preun install' fails
78 # during 'rpm -e ntfsprogs captive-install':
79 PreReq: ntfsprogs
80 Requires: ntfsprogs
81 Requires: ntfsprogs-gnomevfs
82 Requires: gnome-vfs-httpcaptive
83 BuildRequires: gnome-vfs2-devel
84 Requires: gnome-vfs2
85 BuildRequires: libgnomeui-devel
86 Requires: libgnomeui
87 BuildRequires: readline-devel
88 Requires: readline
89
90 %description install
91 Package provides easy enough unattended installation of Microsoft Windows
92 platform filesystem access. Installer finds available NTFS partitions and
93 tries to acquire needed Microsoft Windows filesystem driver files.
94
95 You may need to run 'captive-install-acquire' to answer several questions.
96 NTFS disks will become mount(8)able at directories: /mnt/captive-VOLUME_NAME
97
98 #% %package devel
99 #% Summary: Microsoft Windows platform filesystem access development support.
100 #% Group: Development/System
101 #% Requires: surprise = %{PACKAGE_VERSION}
102 #% 
103 #% %description devel
104 #% Development package containing libraries for static linking together with
105 #% header files needed for any linking.
106 #% 
107 #% Microsoft Windows platform filesystem access.
108 #% TODO
109
110 %prep
111 %setup
112
113 %build
114 # Never disable debug for captive, see FAQ
115 #       "How to check valid input arguments? Invalid processing state assumptions?"
116 %configure \
117                 --enable-shared --disable-static \
118                 --with-readline \
119                 --disable-bug-replay \
120                 --enable-lufs \
121                 --enable-install-pkg \
122                 --enable-sandbox-setuid=@PACKAGE@ \
123                 --enable-sandbox-setgid=@PACKAGE@ \
124                 --enable-sandbox-chroot=%{_var}/lib/@PACKAGE@ \
125                 --enable-man-pages \
126                 --enable-sbin-mountdir=/sbin \
127                 --enable-sbin-mount-fs=ntfs:fastfat:cdfs:ext2fsd \
128                 --disable-gtk-doc
129 make
130
131 %install
132 make DESTDIR=$RPM_BUILD_ROOT install-strip
133
134 %clean
135 rm -rf $RPM_BUILD_ROOT
136
137 %post
138 /sbin/ldconfig
139 /usr/sbin/useradd -c "Captive Sandbox" -s /sbin/nologin -r -d %{_var}/lib/@PACKAGE@ captive 2>/dev/null || true
140
141 %postun
142 /sbin/ldconfig
143 # Remove stale sandbox chroot directories owned by 'captive.captive':
144 rm -rf %{_var}/lib/@PACKAGE@/sandbox-server-*
145
146 %files
147 %defattr(-,root,root)
148 %doc README NEWS AUTHORS TODO
149 %{_libdir}/lib@PACKAGE@-@VERSION@.so
150 %attr(644,root,root) %{_mandir}/man?/@PACKAGE@.*
151 %{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs-@VERSION@.so
152 %{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs.so
153 %{_bindir}/@PACKAGE@-cmdline
154 %attr(644,root,root) %{_mandir}/man?/@PACKAGE@-cmdline.*
155 %attr(4755,root,root) %{_sbindir}/@PACKAGE@-sandbox-server
156 %attr(644,root,root) %{_mandir}/man?/@PACKAGE@-sandbox-server.*
157 %config %{_sysconfdir}/gnome-vfs-2.0/modules/@PACKAGE@.conf
158 %{_datadir}/locale/*/LC_MESSAGES/@PACKAGE@.mo
159 %attr(755,root,root) %{_var}/lib/@PACKAGE@
160 %attr(644,root,root) %{_var}/lib/@PACKAGE@/*.sys
161
162 %files lufs
163 %defattr(-,root,root)
164 %{_libdir}/liblufs-@PACKAGE@fs-@VERSION@.so
165 %{_libdir}/liblufs-@PACKAGE@fs.so
166 %attr(644,root,root) %{_mandir}/man?/lufs-@PACKAGE@fs.*
167 /sbin/mount.@PACKAGE@
168 /sbin/mount.@PACKAGE@-*
169 %attr(644,root,root) %{_mandir}/man?/mount.@PACKAGE@.*
170
171 %post install
172 %{_sbindir}/captive-install-fstab --add
173 %{_sbindir}/captive-install-acquire --text --scan-disks-quick
174
175 %preun install
176 %{_sbindir}/captive-install-fstab --remove
177
178 %files install
179 %defattr(-,root,root)
180 %config %{_sysconfdir}/w32-mod-id.captivemodid.xml
181 %{_sbindir}/captive-install-fstab
182 %attr(644,root,root) %{_mandir}/man?/captive-install-fstab.*
183 %{_sbindir}/captive-install-acquire
184 %attr(644,root,root) %{_mandir}/man?/captive-install-acquire.*
185
186 # %files devel
187 # %defattr(-,root,root)
188 # %doc ChangeLog
189 # /usr/include/@PACKAGE@
190 # /usr/share/aclocal/*
191 # %{_libdir}/gnome-vfs-2.0/modules/libcaptive-gnomevfs.la
192 # /usr/lib/*.a
193 # /usr/lib/*.la
194 # ###for --disable-shared/(--enable-static-link disable):
195 # /usr/lib/*[a-z].so