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