'./configure' requirements made optional for various parts of projects.
[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 Requires: lufs >= 0.9.6-1captive
64
65 %description lufs
66 LUFS is a hybrid userspace filesystem framework.
67
68 Package provides LUFS filesystem module to access Microsoft Windows platform
69 filesystems such as NTFS.
70
71 %package install
72 Summary: Instant installer for Microsoft Windows platform filesystem access.
73 Group: System Environment/Base
74 Requires: captive-lufs = %{PACKAGE_VERSION}
75 BuildRequires: ntfsprogs-devel
76 Requires: ntfsprogs
77 Requires: ntfsprogs-gnomevfs
78 Requires: gnome-vfs-httpcaptive
79 BuildRequires: gnome-vfs2-devel
80 Requires: gnome-vfs2
81 BuildRequires: libgnomeui-devel
82 Requires: libgnomeui
83 BuildRequires: readline-devel
84 Requires: readline
85
86 %description install
87 Package provides easy enough unattended installation of Microsoft Windows
88 platform filesystem access. Installer finds available NTFS partitions and
89 tries to acquire needed Microsoft Windows filesystem driver files.
90
91 You may need to run 'captive-install-acquire' to answer several questions.
92 NTFS disks will become mount(8)able at directories: /mnt/captive-VOLUME_NAME
93
94 #% %package devel
95 #% Summary: Microsoft Windows platform filesystem access development support.
96 #% Group: Development/System
97 #% Requires: surprise = %{PACKAGE_VERSION}
98 #% 
99 #% %description devel
100 #% Development package containing libraries for static linking together with
101 #% header files needed for any linking.
102 #% 
103 #% Microsoft Windows platform filesystem access.
104 #% TODO
105
106 %prep
107 %setup
108
109 %build
110 # Never disable debug for captive, see FAQ
111 #       "How to check valid input arguments? Invalid processing state assumptions?"
112 # FIXME: Use our own CFLAGS to prevent '-mcpu=i686' which up to gcc-20030214 gcc
113 # will ignore stack freeing of attribute((stdcall)) callees in caller functions code.
114 # Check at the final call of src/libcaptive/reactos/ntoskrnl/io/irp.c/IofCallDriver().
115 CFLAGS="-O2"
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-sbin-mountdir=/sbin \
126                 --enable-sbin-mount-fs=ntfs:fastfat:cdfs:ext2fsd \
127                 --disable-gtk-doc
128 make
129
130 %install
131 make DESTDIR=$RPM_BUILD_ROOT install-strip
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %post
137 /sbin/ldconfig
138 /usr/sbin/useradd -c "Captive Sandbox" -s /sbin/nologin -r -d %{_var}/lib/@PACKAGE@ captive 2>/dev/null || true
139
140 %postun
141 /sbin/ldconfig
142
143 %files
144 %defattr(-,root,root)
145 %doc README NEWS AUTHORS TODO
146 %{_libdir}/lib@PACKAGE@-@VERSION@.so
147 %{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs-@VERSION@.so
148 %{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs.so
149 %{_bindir}/@PACKAGE@-cmdline
150 %attr(4755,root,root) %{_sbindir}/@PACKAGE@-sandbox-server
151 %config %{_sysconfdir}/gnome-vfs-2.0/modules/@PACKAGE@.conf
152 %{_datadir}/locale/*/LC_MESSAGES/@PACKAGE@.mo
153 %attr(755,root,root) %{_var}/lib/@PACKAGE@
154 %attr(644,root,root) %{_var}/lib/@PACKAGE@/*.sys
155
156 %files lufs
157 %defattr(-,root,root)
158 %{_libdir}/liblufs-@PACKAGE@fs-@VERSION@.so
159 %{_libdir}/liblufs-@PACKAGE@fs.so
160 /sbin/mount.@PACKAGE@
161 /sbin/mount.@PACKAGE@-*
162
163 %post install
164 %{_sbindir}/captive-install-fstab --add
165 %{_sbindir}/captive-install-acquire --scan-disks-quick
166
167 %preun install
168 %{_sbindir}/captive-install-fstab --remove
169
170 %files install
171 %defattr(-,root,root)
172 %config %{_sysconfdir}/w32-mod-id.captivemodid.xml
173 %{_sbindir}/captive-install-fstab
174 %{_sbindir}/captive-install-acquire
175
176 # %files devel
177 # %defattr(-,root,root)
178 # %doc ChangeLog
179 # /usr/include/@PACKAGE@
180 # /usr/share/aclocal/*
181 # %{_libdir}/gnome-vfs-2.0/modules/libcaptive-gnomevfs.la
182 # /usr/lib/*.a
183 # /usr/lib/*.la
184 # ###for --disable-shared/(--enable-static-link disable):
185 # /usr/lib/*[a-z].so