+RPM build for sandboxing.
[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: Applications/System
28 Source: http://www.jankratochvil.net/project/captive/@PACKAGE@-@VERSION@.tar.gz
29 Copyright: GPL
30 BuildRoot: /var/tmp/@PACKAGE@-@VERSION@-%{release}-root
31
32 %description
33 Existing binary Microsoft Windows file system drivers were exploited
34 for accessing drives with possibly proprietary file system data structures.
35 Open file system API is provided to access these file system drivers.
36 Microsoft Windows system components required by these drivers
37 were analyzed and successfuly emulated in the GNU/Linux operating system.
38
39 The implementation allows applications running under the GNU/Linux operating
40 system to access NTFS drives. File system driver compatibility with VFAT,
41 ISO9660 and EXT2 is also provided.
42
43 #% %package devel
44 #% Summary: Microsoft Windows platform filesystem access development support.
45 #% Group: Development/System
46 #% Requires: surprise = %{PACKAGE_VERSION}
47 #% 
48 #% %description devel
49 #% Development package containing libraries for static linking together with
50 #% header files needed for any linking.
51 #% 
52 #% Microsoft Windows platform filesystem access.
53 #% TODO
54
55 %prep
56 %setup
57
58 %build
59 # Never disable debug for captive, see FAQ
60 #       "How to check valid input arguments? Invalid processing state assumptions?"
61 # FIXME: Use our own CFLAGS to prevent '-mcpu=i686' which up to gcc-20030214 gcc
62 # will ignore stack freeing of attribute((stdcall)) callees in caller functions code.
63 # Check at the final call of src/libcaptive/reactos/ntoskrnl/io/irp.c/IofCallDriver().
64 CFLAGS="-O2"
65 %configure \
66                 --enable-shared --disable-static \
67                 --with-readline \
68                 --with-sandbox-setuid=@PACKAGE@ \
69                 --with-sandbox-setgid=@PACKAGE@ \
70                 --with-sandbox-chroot=%{_var}/lib/@PACKAGE@ \
71                 --disable-gtk-doc
72 make
73
74 %install
75 make DESTDIR=$RPM_BUILD_ROOT install-strip
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 /sbin/ldconfig
82
83 %postun
84 /sbin/ldconfig
85
86 %files
87 %defattr(-,root,root)
88 %doc README NEWS AUTHORS
89 %{_libdir}/lib@PACKAGE@-@VERSION@.so
90 %{_libdir}/liblufs-@PACKAGE@fs-@VERSION@.so
91 %{_libdir}/liblufs-@PACKAGE@fs.so
92 %{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs-@VERSION@.so
93 %{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs.so
94 %{_bindir}/@PACKAGE@-cmdline
95 %attr(4755,root,root) %{_sbindir}/@PACKAGE@-sandbox-server
96 %{_sysconfdir}/gnome-vfs-2.0/modules/@PACKAGE@.conf
97 %{_datadir}/locale/*/LC_MESSAGES/@PACKAGE@.mo
98 %attr(755,root,root) %{_var}/lib/@PACKAGE@
99
100 # %files devel
101 # %defattr(-,root,root)
102 # %doc ChangeLog
103 # /usr/include/@PACKAGE@
104 # /usr/share/aclocal/*
105 # %{_libdir}/gnome-vfs-2.0/modules/libcaptive-gnomevfs.la
106 # /usr/lib/*.a
107 # /usr/lib/*.la
108 # ###for --disable-shared/(--enable-static-link disable):
109 # /usr/lib/*[a-z].so