SPECS: captive-drivers.spec - added bcond with license_agreement s...

tommat tommat at pld-linux.org
Thu Jan 26 21:38:47 CET 2006


Author: tommat                       Date: Thu Jan 26 20:38:46 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added bcond with license_agreement so it can be sent to builders and ftp
- ver 0.2 rel 1

---- Files affected:
SPECS:
   captive-drivers.spec (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SPECS/captive-drivers.spec
diff -u SPECS/captive-drivers.spec:1.4 SPECS/captive-drivers.spec:1.5
--- SPECS/captive-drivers.spec:1.4	Sat Dec 24 17:50:41 2005
+++ SPECS/captive-drivers.spec	Thu Jan 26 21:38:41 2006
@@ -1,44 +1,102 @@
 # $Revision$, $Date$
 # the drivers that were supposed to work, didn't.
 # so these drivers didn't work for me.
+#
+# Conditional build:
+%bcond_with	license_agreement	# generates package
+%define		source_url      http://download.microsoft.com/download/9/7/6/9763833d-bd58-41e2-9911-50f64c7252a3/
+#
 Summary:	NTFS Drivers
 Summary(pl):	Sterowniki NTFS
-Name:		captive-drivers
-Version:	0.1
-Release:	0.2
+%define		base_name	captive-drivers
+%if %{with license_agreement}
+Name:		%{base_name}
+%else
+Name:		%{base_name}-installer
+%endif
+Version:	0.2
+%define		_rel	1
+Release:	%{_rel}%{?with_license_agreement:wla}
+Group:		Libraries
 License:	restricted, non-distributable
-Group:		Applications/System
-Source0:	http://download.microsoft.com/download/9/7/6/9763833d-bd58-41e2-9911-50f64c7252a3/xpsp1a_en_x86_CHK.exe
-# NoSource0-md5:	257c90b85f20f597caad8a4bd8c481ef
-NoSource:	0
+%if %{with license_agreement}
+Source0:	%{source_url}xpsp1a_en_x86_CHK.exe
 BuildRequires:	cabextract
 Requires:	captive
+%else
+Source0:	license-installer.sh
+Requires:	cpio
+Requires:	rpm-build-tools
+Requires:	wget
+Provides:	%{base_name}
+%endif
 ExclusiveArch:	%{ix86}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Contains ntfs.sys and ntoskrnl.exe from Windows XP SP1.
+%if %{without license_agreement}
+License issues made us not to include inherent files into this package
+by default. If you want to create full working package please build it
+with the following command:
+
+%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
+%endif
 
 %description -l pl
 Pakiet zawierający ntfs.sys i ntoskrnl.exe z Windows XP SP1.
+%if %{without license_agreement}
+Kwestie licencji zmusiły nas do niedołączania do tego pakietu istotnych
+plików. Jeśli chcesz stworzyć w pełni funkcjonalny pakiet, zbuduj go za
+pomocą polecenia:
+
+%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
+%endif
 
 %prep
 %setup -q -c -T
+%if %{with license_agreement}
 cabextract %{SOURCE0} -F ntfs.sys
 cabextract %{SOURCE0} -F ntoskrnl.ex_
 cabextract ntoskrnl.ex_
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{without license_agreement}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
+
+sed -e '
+	s/@BASE_NAME@/%{base_name}/g
+	s/@TARGET_CPU@/%{_target_cpu}/g
+	s- at VERSION@-%{version}-g
+	s- at RELEASE@-%{release}-g
+	s, at SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
+' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
+
+install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
+%else
 install -d $RPM_BUILD_ROOT/var/lib/captive
 install ntfs.sys ntoskrnl.exe $RPM_BUILD_ROOT/var/lib/captive
+%endif
+
+%if %{without license_agreement}
+%post
+%{_bindir}/%{base_name}.install
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%if %{with license_agreement}
 /var/lib/captive/*
+%else
+%attr(755,root,root) %{_bindir}/%{base_name}.install
+%{_datadir}/%{base_name}
+%endif
 
 %define	date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -46,6 +104,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2006/01/26 20:38:41  tommat
+- added bcond with license_agreement so it can be sent to builders and ftp
+- ver 0.2 rel 1
+
 Revision 1.4  2005/12/24 16:50:41  glen
 - require captive
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/captive-drivers.spec?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list