packages: file/file.spec - rel 2; let misc be dir for magic files and provi...

arekm arekm at pld-linux.org
Sat May 9 20:07:31 CEST 2009


Author: arekm                        Date: Sat May  9 18:07:31 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; let misc be dir for magic files and provide compat symlink

---- Files affected:
packages/file:
   file.spec (1.165 -> 1.166) 

---- Diffs:

================================================================
Index: packages/file/file.spec
diff -u packages/file/file.spec:1.165 packages/file/file.spec:1.166
--- packages/file/file.spec:1.165	Fri May  8 16:34:28 2009
+++ packages/file/file.spec	Sat May  9 20:07:26 2009
@@ -30,7 +30,7 @@
 Summary(zh_TW.UTF-8):	用於決定檔案類型的一個工具程式。
 Name:		file
 Version:	5.03
-Release:	1
+Release:	2
 License:	distributable
 Group:		Applications/File
 URL:		http://www.darwinsys.com/file/
@@ -281,7 +281,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/%{_lib},%{_datadir}/file}
+install -d $RPM_BUILD_ROOT/%{_lib}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -300,8 +300,8 @@
 
 install -D magic/Localstuff $RPM_BUILD_ROOT%{_sysconfdir}/magic
 
-cat magic/Header magic/Magdir/* %{SOURCE2} %{SOURCE3} >$RPM_BUILD_ROOT%{_datadir}/file/magic
-awk -f %{SOURCE4} <$RPM_BUILD_ROOT%{_datadir}/file/magic >$RPM_BUILD_ROOT%{_datadir}/file/magic.mime
+cat magic/Header magic/Magdir/* %{SOURCE2} %{SOURCE3} >$RPM_BUILD_ROOT%{_datadir}/misc/magic
+awk -f %{SOURCE4} <$RPM_BUILD_ROOT%{_datadir}/misc/magic >$RPM_BUILD_ROOT%{_datadir}/misc/magic.mime
 
 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 
@@ -311,7 +311,9 @@
 	> $RPM_BUILD_ROOT%{_mandir}/pt_BR/man5/magic.5
 rm -f $RPM_BUILD_ROOT%{_mandir}/pt_BR/man5/magic.4
 
-src/file -m $RPM_BUILD_ROOT%{_datadir}/file/magic -c -C
+src/file -m $RPM_BUILD_ROOT%{_datadir}/misc/magic -c -C
+
+ln -s misc $RPM_BUILD_ROOT%{_datadir}/file
 
 rm -f $RPM_BUILD_ROOT%{_mandir}/README.file-non-english-man-pages
 rm -f $RPM_BUILD_ROOT%{_mandir}/file-magic4.diff
@@ -322,6 +324,16 @@
 %post	-n libmagic -p /sbin/ldconfig
 %postun	-n libmagic -p /sbin/ldconfig
 
+%pretrans
+# it used to be directory
+if [ -d %{_datadir}/file ]; then
+	mv -b %{_datadir}/file{,.dir}
+%banner -e %{name} <<EOF
+Check out %{_datadir}/file.dir
+for your own files and remove it when done.
+EOF
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog COPYING README
@@ -329,6 +341,7 @@
 %{_datadir}/file
 %{_datadir}/misc/magic
 %{_datadir}/misc/magic.mgc
+%{_datadir}/misc/magic.mime
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/magic
 %{_mandir}/man1/file.1*
 %{_mandir}/man5/magic.5*
@@ -373,6 +386,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.166  2009/05/09 18:07:26  arekm
+- rel 2; let misc be dir for magic files and provide compat symlink
+
 Revision 1.165  2009/05/08 14:34:28  witekfl
 - up to 5.0.3
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/file/file.spec?r1=1.165&r2=1.166&f=u



More information about the pld-cvs-commit mailing list