From deb57a418837451a59d9d04eba56c45fc428871b Mon Sep 17 00:00:00 2001 From: Orcan Ogetbil Date: Dec 04 2008 02:03:18 +0000 Subject: - Code cleanup Sun Nov 30 2008 Orcan Ogetbil 1.2-5 - Workaround for the "broken ghosts". Sun Nov 30 2008 Orcan Ogetbil 1.2-4 - Fixed a typo in the %%do_trigger* of tar\.lzma - Added rpm to the default list - Attempted to mark the non-default archivers as ghosts Thu Nov 20 2008 Orcan Ogetbil 1.2-3 - License is GPLv3. - Install the scripts in %%{_datadir}/%%{name} and the symlinks in %%{var}/lib/deco. Wed Nov 19 2008 Orcan Ogetbil 1.2-2 - Added conditionals to the trigger functions to suppress warnings on updates. Wed Oct 29 2008 Orcan Ogetbil 1.2-1 - Initial build. --- diff --git a/.cvsignore b/.cvsignore index e69de29..bde6f5c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +deco-archive-1.2.tar.gz diff --git a/deco-archive.spec b/deco-archive.spec new file mode 100644 index 0000000..3691dc7 --- /dev/null +++ b/deco-archive.spec @@ -0,0 +1,152 @@ +Name: deco-archive +Version: 1.2 +Release: 6%{?dist} +Summary: Extraction scripts for various archive formats for use of deco +Group: Applications/Archiving +License: GPLv3 +URL: http://hartlich.com/deco/ +Source0: http://hartlich.com/deco/archive/download/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +Requires: bzip2,coreutils,cpio,gzip,rpm,tar +Requires: deco >= 1.5.6 + +%description +deco-archive provides support for popular archive +formats to the deco file extraction framework. + +%prep +%setup -q + +%build +echo "Nothing to build." + +%install +rm -rf %{buildroot} %{name}-ghosts.list %{name}-links.list + +make install DESTDIR=%{buildroot} SHARE=%{_datadir}/%{name} + +# %%{_var}/lib/deco is owned by deco. +# This is where deco will look for extraction scripts. +install -dm 755 %{buildroot}/%{_var}/lib/deco + +# Install the default archivers and add the others to the ghost files list +for i in *; do + if [[ -d $i || -h $i ]] ; then + ln -s ../../..%{_datadir}/%{name}/"$i" %{buildroot}/%{_var}/lib/deco + case $i in + bz2|cpio|gz|rpm|z|tar|"tar\.bz2"|"tar\.gz"|"tar\.z"|taz|tbz|tgz) + echo "%{_var}/lib/deco/$i" >> %{name}-links.list ;; + *) + echo "%ghost %{_var}/lib/deco/$i" >> %{name}-ghosts.list ;; + esac + fi +done +sed -e 's@[[\\]@?@g' %{name}-ghosts.list %{name}-links.list > %{name}.files + +%clean +rm -rf %{buildroot} + + +%define do_triggerin() for i in %1; do (if [ ! -e %{_var}/lib/deco/$i ]; then ln -s ../../..%{_datadir}/%{name}/"$i" %{_var}/lib/deco/ || : ; fi); done; +%define do_triggerun() ( [ $2 -gt 0 ] && [ $1 -gt 0 ] ) || (for i in %1; do ( rm -f %{_var}/lib/deco/$i || : ); done;) + +# Not handled (yet?): +# alz (unalz), dpkg-deb (deb,udeb), shn (shorten), zoo + +%triggerin -- binutils +%do_triggerin {a,ar} +%triggerun -- binutils +%do_triggerun {a,ar} + +%triggerin -- p7zip +%do_triggerin {7z,"7z\.[0-9]{2,}",t7z,"t7z\.[0-9]{2,}","tar\.7z","tar\.7z\.[0-9]{2,}"} +%triggerun -- p7zip +%do_triggerun {7z,"7z\.[0-9]{2,}",t7z,"t7z\.[0-9]{2,}","tar\.7z","tar\.7z\.[0-9]{2,}"} + +%triggerin -- unace +%do_triggerin "ace|[c0-9][0-9]{2}" +%triggerun -- unace +%do_triggerun "ace|[c0-9][0-9]{2}" + +# Note that the following also requires the installation +# of Monkey's Audio through wine +# http://www.monkeysaudio.com/download.html +%triggerin -- wine +%do_triggerin ape +%triggerun -- wine +%do_triggerun ape + +%triggerin -- arc +%do_triggerin {arc,ark,sue} +%triggerun -- arc +%do_triggerun {arc,ark,sue} + +%triggerin -- arj +%do_triggerin arj +%triggerun -- arj +%do_triggerun arj + +%triggerin -- cabextract +%do_triggerin cab +%triggerun -- cabextract +%do_triggerun cab + +%triggerin -- unrar +%do_triggerin {cbr,"rar|[rst][0-9]{2}","part[0-9]+\.rar"} +%triggerun -- unrar +%do_triggerun {cbr,"rar|[rst][0-9]{2}","part[0-9]+\.rar"} + +%triggerin -- unzip +%do_triggerin {cbz,ear,jar,od{c,f,g,i,m,p,s,t},ot{c,f,g,h,i,p,s,t},oxt,pk{3,4},wsz,xpi,zip} +%triggerun -- unzip +%do_triggerun {cbz,ear,jar,od{c,f,g,i,m,p,s,t},ot{c,f,g,h,i,p,s,t},oxt,pk{3,4},wsz,xpi,zip} + +%triggerin -- flac +%do_triggerin flac +%triggerun -- flac +%do_triggerun flac + +%triggerin -- lha +%do_triggerin {lha,lzh} +%triggerun -- lha +%do_triggerun {lha,lzh} + +%triggerin -- lzma +%do_triggerin {lzma,"tar\.lzma",tlz} +%triggerun -- lzma +%do_triggerun {lzma,"tar\.lzma",tlz} + +%triggerin -- lzop +%do_triggerin lzo +%triggerun -- lzop +%do_triggerun lzo + + +%files -f %{name}.files +%defattr(-,root,root,-) +%doc LICENSE CREDITS NEWS README +%{_datadir}/%{name} + +%changelog +* Mon Dec 01 2008 Orcan Ogetbil 1.2-6 +- Code cleanup + +* Sun Nov 30 2008 Orcan Ogetbil 1.2-5 +- Workaround for the "broken ghosts". + +* Sun Nov 30 2008 Orcan Ogetbil 1.2-4 +- Fixed a typo in the %%do_trigger* of tar\.lzma +- Added rpm to the default list +- Attempted to mark the non-default archivers as ghosts + +* Thu Nov 20 2008 Orcan Ogetbil 1.2-3 +- License is GPLv3. +- Install the scripts in %%{_datadir}/%%{name} and the symlinks in %%{var}/lib/deco. + +* Wed Nov 19 2008 Orcan Ogetbil 1.2-2 +- Added conditionals to the trigger functions to suppress warnings on updates. + +* Wed Oct 29 2008 Orcan Ogetbil 1.2-1 +- Initial build. diff --git a/import.log b/import.log new file mode 100644 index 0000000..e4896a8 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +deco-archive-1_2-6_fc10:F-9:deco-archive-1.2-6.fc10.src.rpm:1228356166 diff --git a/sources b/sources index e69de29..5ad6f6a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5f3900969477445bd044009a91cab18e deco-archive-1.2.tar.gz