%define clip_dir %{_datadir}/clipart %define libreoffice 0 Name: clipart-openclipart Version: 2.0 Release: %mkrel 13 Summary: Open Clip Art Library License: Public Domain Group: Graphics/Utilities Url: https://openclipart.org/ Source: https://openclipart.org/downloads/%version/openclipart-%{version}-svgonly.tar.bz2 Source1: clean-up-sources.sh Source2: libreoffice-openclipart.blacklist %if %libreoffice BuildRequires: libreoffice-core %endif BuildArch: noarch %description This is a collection of 100% license-free, royalty-free, and restriction-free art that you can use for whatever purpose you see fit. Most of the art in this package is in the Scalable Vector Graphic (SVG) format, which is an XML format approved by the W3C and used in a wide range of software applications, including Inkscape, Adobe Illustrator, Batik, and more. The goal of the Open Clip Art Library is to provide the public with a huge collection of reusable art for any purpose. For more information, including how you can contribute to this growing library, please see https://openclipart.org/ %prep %setup -q -n openclipart-%{version}-svgonly %build # nothing to build %install mkdir -p %{buildroot}%clip_dir ( cd ./clipart && tar c ./ | tar x -C %{buildroot}%{clip_dir} ) find %{buildroot}%{clip_dir} -type f -exec chmod 644 '{}' \; %if %libreoffice GENGAL_BIN=%_libdir/libreoffice/basis3.3/program/gengal for dir in `find -L %{buildroot}%clip_dir -mindepth 1 -maxdepth 1 -type d | LC_CTYPE=C sort` ; do # get the gallery name from the directory name # and make the first character uppercase dirname=${dir##*/} gal_name=$dirname gal_name=`echo $gal_name | tr "_-" " "` gal_name_rest=${gal_name#?} gal_name_first_char=${gal_name%$gal_name_rest} gal_name_first_char=`echo $gal_name_first_char | tr "a-z" "A-Z"` gal_name=$gal_name_first_char$gal_name_rest # echo "Doing gallery $gal_name..." # # add too big files to the black list (svg import is somewhat slow) blacklist=`mktemp /tmp/gengal.blacklist.XXXXXX` IFS_saved="$IFS" IFS=" " for file in `find $dir -name "*.svg" | LC_CTYPE=C sort` ; do test -L $file && echo "$file" >>$blacklist echo size=`du -L $file | cut -f1` test `du -b -L $file | cut -f1` -gt 100000 && echo "$file" >>$blacklist done IFS="$IFS_saved" # add files from explicit blacklist if any grep "^$dirname" libreoffice-openclipart.blacklist >>$blacklist || true echo "Ignoring too big and problematic files:" cat $blacklist echo "Enf of the list" # # xargs is necessary because the list of files is quite long find $dir -name "*.svg" -print0 | \ LC_CTYPE=C sort -z | \ grep -z -v -f $blacklist | \ { xargs -0 $GENGAL_BIN -headless --name "$gal_name" --path $RPM_BUILD_DIR/%name-%version --number-from "%gal_num_from" || exit 1; } rm $blacklist done # FIXME: The stuff from this directory is linked to ooo-home by the script # link-to-ooo-home; so it must keep the usual OOo structure install -m 755 -d $RPM_BUILD_ROOT%_libdir/libreoffice/basis3.3/share/gallery for file in `ls sg*` ; do install -m 644 $file $RPM_BUILD_ROOT%_libdir/libreoffice/basis3.3/share/gallery echo "%_libdir/libreoffice/basis3.3/share/gallery/$file" >>$RPM_BUILD_ROOT%_datadir/%ooo_home/openclipart_list.txt done %endif %files %doc README AUTHORS ChangeLog INSTALL LICENSE NEWS %clip_dir %changelog * Sat Mar 19 2022 umeabot <umeabot> 2.0-13.mga9 + Revision: 1801041 - Mageia 9 Mass Rebuild + danf <danf> - Switch URLs from http: to https: * Tue Feb 11 2020 umeabot <umeabot> 2.0-12.mga8 + Revision: 1490243 - Mageia 8 Mass Rebuild * Tue Sep 18 2018 umeabot <umeabot> 2.0-11.mga7 + Revision: 1261663 - Mageia 7 Mass Rebuild * Mon Feb 08 2016 umeabot <umeabot> 2.0-10.mga6 + Revision: 944415 - Mageia 6 Mass Rebuild * Wed Oct 15 2014 umeabot <umeabot> 2.0-9.mga5 + Revision: 741845 - Second Mageia 5 Mass Rebuild * Thu Sep 18 2014 umeabot <umeabot> 2.0-8.mga5 + Revision: 693621 - Rebuild to fix library dependencies * Tue Sep 16 2014 umeabot <umeabot> 2.0-7.mga5 + Revision: 678426 - Mageia 5 Mass Rebuild * Fri Oct 18 2013 umeabot <umeabot> 2.0-6.mga4 + Revision: 521731 - Mageia 4 Mass Rebuild * Thu Jan 24 2013 fwang <fwang> 2.0-5.mga3 + Revision: 391802 - update rpm group + umeabot <umeabot> - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild + dmorgan <dmorgan> - Fix libreoffice binary name - Fix libreoffice binary name - Fix images path Fix buildrequires * Wed Mar 30 2011 dmorgan <dmorgan> 2.0-2.mga1 + Revision: 78980 - Add missing source - Start to add libreoffice files * Mon Mar 28 2011 ahmad <ahmad> 2.0-1.mga1 + Revision: 78476 - install in %%{_datadir}/clipart - simplify the spec + ennael <ennael> - clean broken image - update openclipart to fix inkscape bug and fuzzy images - imported package clipart-openclipart * Sun Aug 09 2009 Oden Eriksson <oeriksson@mandriva.com> 0.18-10mdv2010.0 + Revision: 413242 - rebuild * Sat Mar 07 2009 Antoine Ginies <aginies@mandriva.com> 0.18-9mdv2009.1 + Revision: 350723 - rebuild * Mon Jun 16 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.18-8mdv2009.0 + Revision: 220503 - rebuild * Fri Jan 11 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.18-7mdv2008.1 + Revision: 149114 - rebuild - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Sat Sep 15 2007 Adam Williamson <awilliamson@mandriva.org> 0.18-6mdv2008.0 + Revision: 85795 - rebuild for 2008 * Sat Mar 17 2007 Giuseppe Ghibò <ghibo@mandriva.com> 0.18-5mdv2007.1 + Revision: 145641 - Added urw-fonts to BuildRequires. - Rebuilt to provide a clipart release to fix also bug #29568 (previous package stopped .png at animals). - Added Source1 (from opensuse) to clean broken PNG files. * Sat Feb 24 2007 Giuseppe Ghibò <ghibo@mandriva.com> 0.18-4mdv2007.1 + Revision: 125439 - Rebuilt. - Import clipart-openclipart * Fri Sep 15 2006 Giuseppe Ghibò <ghibo@mandriva.com> 0.18-3mdv2007.0 - Rebuild to force package signing... (bug #21436). * Thu Jan 26 2006 Giuseppe Ghibò <ghibo@mandriva.com> 0.18-2mdk - Removed empty dirs in /usr/share/images/openclipart/build. * Mon Jan 02 2006 Giuseppe Ghibò <ghibo@mandriva.com> 0.18-1mdk - Release 0.18. * Tue Sep 13 2005 Giuseppe Ghibò <ghibo@mandriva.com> 0.17-2mdk - Bigger .png files for galleries converted using inkscape. * Sun Sep 11 2005 Giuseppe Ghibò <ghibo@mandriva.com> 0.17-1mdk - Release 0.17. * Tue Jul 12 2005 Mandriva Linux Team <http://www.mandrivaexpert.com/> 0.15-1mdk - New release 0.15 * Tue Feb 01 2005 Frederic Lepied <flepied@mandrakesoft.com> 0.10-1mdk - New release 0.10 * Mon Jan 03 2005 Frederic Lepied <flepied@mandrakesoft.com> 0.09-1mdk - New release 0.09 * Sat Oct 02 2004 Frederic Lepied <flepied@mandrakesoft.com> 0.06-1mdk - initial packaging (spec from AltLinux) * Fri Jul 02 2004 Vitaly Lipatov <lav@altlinux.ru> 0.04-alt1 - first build for Sisyphus