Check also <ntfs/*> include files when checking 'libntfs' availability.
[captive.git] / captive.spec.in
index c8e2adc..e226be6 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 # rpm package description file for building
-# Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
+# Copyright (C) 2002-2003 Jan Kratochvil <project-captive@jankratochvil.net>
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
+# Temporary cludge before full 'devel' package gets deployed
+%define _unpackaged_files_terminate_build 0
+
 Summary: Microsoft Windows platform filesystem access.
 Name: @PACKAGE@
 %define release 0
 Version: @VERSION@
 Release: %{release}
-Group: Applications/System
-Source: http://short.vellum.cz/sw/@PACKAGE@-@VERSION@.tar.gz
+Group: System Environment/Base
+Packager: Jan Kratochvil <project-captive@jankratochvil.net>
+Source: http://www.jankratochvil.net/project/captive/dist/@PACKAGE@-@VERSION@.tar.gz
 Copyright: GPL
 BuildRoot: /var/tmp/@PACKAGE@-@VERSION@-%{release}-root
+BuildRequires: ORBit2-devel
+Requires: ORBit2
+# Due to --with-orbit-line=linc
+Conflicts: ORBit2 >= 2.7.0
+BuildRequires: openssl-devel
+Requires: openssl
+BuildRequires: gnome-vfs2-devel
+Requires: gnome-vfs2
+BuildRequires: libxml2-devel
+Requires: libxml2
+BuildRequires: popt
+Requires: popt
+BuildRequires: glib2-devel
+Requires: glib2
+BuildRequires: readline-devel
+Requires: readline
+BuildRequires: gcc >= 3.0
 
 %description
-Microsoft Windows platform filesystem access.
-TODO
+Existing binary Microsoft Windows file system drivers were exploited
+for accessing drives with possibly proprietary file system data structures.
+Open file system API is provided to access these file system drivers.
+Microsoft Windows system components required by these drivers
+were analyzed and successfuly emulated in the GNU/Linux operating system.
+
+The implementation allows applications running under the GNU/Linux operating
+system to access NTFS drives. File system driver compatibility with VFAT,
+ISO9660 and EXT2 is also provided.
+
+%package lufs
+Summary: LUFS module for Microsoft Windows platform filesystem access.
+Group: System Environment/Base
+Requires: captive = %{PACKAGE_VERSION}
+BuildRequires: lufs >= 0.9.6-1captive
+Requires: lufs >= 0.9.6-1captive
+
+%description lufs
+LUFS is a hybrid userspace filesystem framework.
+
+Package provides LUFS filesystem module to access Microsoft Windows platform
+filesystems such as NTFS. Use filesystem type 'captive-ntfs' for NTFS disks.
+
+%package install
+Summary: Instant installer for Microsoft Windows platform filesystem access.
+Group: System Environment/Base
+Requires: captive-lufs = %{PACKAGE_VERSION}
+# Versions before 1.8.0 were too buggy
+BuildRequires: ntfsprogs-devel >= 1.8.0
+# 'PreReq' needed for Mandrake-9.1 otherwise '%preun install' fails
+# during 'rpm -e ntfsprogs captive-install':
+PreReq: ntfsprogs >= 1.8.0
+Requires: ntfsprogs >= 1.8.0
+Requires: ntfsprogs-gnomevfs
+Requires: gnome-vfs-httpcaptive
+BuildRequires: gnome-vfs2-devel
+Requires: gnome-vfs2
+BuildRequires: libgnomeui-devel
+Requires: libgnomeui
+BuildRequires: readline-devel
+Requires: readline
+BuildRequires: libxml2-devel >= 2.4.29
+Requires: libxml2 >= 2.4.29
 
-%package devel
-Summary: Microsoft Windows platform filesystem access development support.
-Group: Development/System
-Requires: surprise = %{PACKAGE_VERSION}
+%description install
+Package provides easy enough unattended installation of Microsoft Windows
+platform filesystem access. Installer finds available NTFS partitions and
+tries to acquire needed Microsoft Windows filesystem driver files.
 
-%description devel
-Development package containing libraries for static linking together with
-header files needed for any linking.
+You may need to run 'captive-install-acquire' to answer several questions.
+NTFS disks will become mount(8)able at directories: /mnt/captive-VOLUME_NAME
 
-Microsoft Windows platform filesystem access.
-TODO
+#% %package devel
+#% Summary: Microsoft Windows platform filesystem access development support.
+#% Group: Development/System
+#% Requires: surprise = %{PACKAGE_VERSION}
+#% 
+#% %description devel
+#% Development package containing libraries for static linking together with
+#% header files needed for any linking.
+#% 
+#% Microsoft Windows platform filesystem access.
+#% TODO
 
 %prep
 %setup
@@ -49,7 +119,19 @@ TODO
 # Never disable debug for captive, see FAQ
 #      "How to check valid input arguments? Invalid processing state assumptions?"
 %configure \
-               --enable-shared --enable-static
+               --enable-shared --disable-static \
+               --with-readline \
+               --disable-bug-replay \
+               --enable-lufs \
+               --enable-install-pkg \
+               --enable-sandbox-setuid=@PACKAGE@ \
+               --enable-sandbox-setgid=@PACKAGE@ \
+               --enable-sandbox-chroot=%{_var}/lib/@PACKAGE@ \
+               --enable-man-pages \
+               --enable-sbin-mountdir=/sbin \
+               --enable-sbin-mount-fs=ntfs:fastfat:cdfs:ext2fsd \
+               --disable-gtk-doc \
+               --with-orbit-line=linc
 make
 
 %install
@@ -60,27 +142,61 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/ldconfig
+/usr/sbin/useradd -c "Captive Sandbox" -s /sbin/nologin -r -d %{_var}/lib/@PACKAGE@ captive 2>/dev/null || true
 
 %postun
 /sbin/ldconfig
+# Remove stale sandbox chroot directories owned by 'captive.captive':
+rm -rf %{_var}/lib/@PACKAGE@/sandbox-server-*
 
 %files
 %defattr(-,root,root)
-%doc INSTALL
-/sbin/@PACKAGE@cmdline
-/usr/bin/@PACKAGE@server
-/usr/share/@PACKAGE@
-/usr/share/locale/*/LC_MESSAGES/@PACKAGE@.mo
-#for version-info use: /lib/*.so.*
-###for --disable-shared/(--enable-static-link disable):
-/usr/lib/*-*.so
-
-%files devel
+%doc README NEWS AUTHORS TODO
+%{_libdir}/lib@PACKAGE@-@VERSION@.so
+%attr(644,root,root) %{_mandir}/man?/@PACKAGE@.*
+%{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs-@VERSION@.so
+%{_libdir}/gnome-vfs-2.0/modules/lib@PACKAGE@-gnomevfs.so
+%{_bindir}/@PACKAGE@-cmdline
+%attr(644,root,root) %{_mandir}/man?/@PACKAGE@-cmdline.*
+%attr(4755,root,root) %{_sbindir}/@PACKAGE@-sandbox-server
+%attr(644,root,root) %{_mandir}/man?/@PACKAGE@-sandbox-server.*
+%config %{_sysconfdir}/gnome-vfs-2.0/modules/@PACKAGE@.conf
+%{_datadir}/locale/*/LC_MESSAGES/@PACKAGE@.mo
+%attr(755,root,root) %{_var}/lib/@PACKAGE@
+%attr(1777,root,root) %{_var}/lib/@PACKAGE@/tmp
+%attr(644,root,root) %{_var}/lib/@PACKAGE@/*.sys
+
+%files lufs
+%defattr(-,root,root)
+%{_libdir}/liblufs-@PACKAGE@fs-@VERSION@.so
+%{_libdir}/liblufs-@PACKAGE@fs.so
+%attr(644,root,root) %{_mandir}/man?/lufs-@PACKAGE@fs.*
+/sbin/mount.@PACKAGE@
+/sbin/mount.@PACKAGE@-*
+%attr(644,root,root) %{_mandir}/man?/mount.@PACKAGE@.*
+
+%post install
+%{_sbindir}/captive-install-fstab --add
+%{_sbindir}/captive-install-acquire --text --scan-disks-quick
+
+%preun install
+%{_sbindir}/captive-install-fstab --remove
+
+%files install
 %defattr(-,root,root)
-%doc ChangeLog
-/usr/include/@PACKAGE@
-/usr/share/aclocal/*
-/usr/lib/*.a
-/usr/lib/*.la
-###for --disable-shared/(--enable-static-link disable):
-/usr/lib/*[a-z].so
+%config %{_sysconfdir}/w32-mod-id.captivemodid.xml
+%{_sbindir}/captive-install-fstab
+%attr(644,root,root) %{_mandir}/man?/captive-install-fstab.*
+%{_sbindir}/captive-install-acquire
+%attr(644,root,root) %{_mandir}/man?/captive-install-acquire.*
+
+# %files devel
+# %defattr(-,root,root)
+# %doc ChangeLog
+# /usr/include/@PACKAGE@
+# /usr/share/aclocal/*
+# %{_libdir}/gnome-vfs-2.0/modules/libcaptive-gnomevfs.la
+# /usr/lib/*.a
+# /usr/lib/*.la
+# ###for --disable-shared/(--enable-static-link disable):
+# /usr/lib/*[a-z].so