1 |
%define clip_dir %{_datadir}/images/openclipart |
2 |
|
3 |
Name: clipart-openclipart |
4 |
Version: 2.0 |
5 |
Release: %mkrel 1 |
6 |
Summary: Open Clip Art Library |
7 |
License: Public Domain |
8 |
Group: Graphics |
9 |
Url: http://www.openclipart.org/ |
10 |
Source: http://www.openclipart.org/downloads/%version/openclipart-%{version}-svgonly.tar.bz2 |
11 |
Source1: clean-up-sources.sh |
12 |
Buildarch: noarch |
13 |
BuildRequires: inkscape |
14 |
BuildRequires: urw-fonts |
15 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root |
16 |
|
17 |
%description |
18 |
This is a collection of 100% license-free, royalty-free, and |
19 |
restriction-free art that you can use for whatever purpose you see fit. |
20 |
|
21 |
Most of the art in this package is in the Scalable Vector Graphic (SVG) |
22 |
format, which is an XML format approved by the W3C and used in a wide |
23 |
range of software applications, including Inkscape, Adobe Illustrator, |
24 |
Batik, and more. |
25 |
|
26 |
The goal of the Open Clip Art Library is to provide the public with a |
27 |
huge collection of reusable art for any purpose. |
28 |
|
29 |
For more information, including how you can contribute to this growing |
30 |
library, please see http://www.openclipart.org/ |
31 |
|
32 |
%prep |
33 |
%setup -q -n openclipart-%{version}-svgonly |
34 |
|
35 |
# clean ugly/broken |
36 |
(cd clipart |
37 |
rm -rf ./unsorted |
38 |
rm -f ./computer/icons/lemon-theme/devices/automatic \ |
39 |
./computer/icons/lemon-theme/actions/automatic \ |
40 |
./computer/icons/lemon-theme/filesystems/automatic \ |
41 |
./computer/icons/lemon-theme/apps/automatic \ |
42 |
./computer/icons/lemon-theme/mimetypes/automatic \ |
43 |
./buildings/perspectival_house_01.* \ |
44 |
./signs_and_symbols/flags/america/united_states/.usa_hawaii.svg.swp |
45 |
) |
46 |
|
47 |
%build |
48 |
(cd clipart |
49 |
# build png files (for OOo galleries), taken from OOo's "build-galleries" script |
50 |
for pict_svg in `find ./ -name "*.svg" -type f`; do |
51 |
pict_dir=${pict_svg#./} |
52 |
pict_dir=${pict_dir%/*} |
53 |
pict_png=${pict_svg##*/} |
54 |
pict_png=${pict_png%.svg}.png |
55 |
mkdir -p build/$pict_dir |
56 |
echo "Converting $pict_svg to $pict_dir/$pict_png..." |
57 |
inkscape -f $pict_svg -e $pict_dir/$pict_png |
58 |
done |
59 |
) |
60 |
|
61 |
%install |
62 |
rm -rf $RPM_BUILD_ROOT |
63 |
|
64 |
mkdir -p $RPM_BUILD_ROOT%clip_dir |
65 |
(cd ./clipart |
66 |
tar c ./ | tar x -C $RPM_BUILD_ROOT%{clip_dir} |
67 |
) |
68 |
|
69 |
rm -f $RPM_BUILD_ROOT%{clip_dir}/{PASSFAIL,README,TODO} |
70 |
|
71 |
# remove empty dirs |
72 |
rm -rf $RPM_BUILD_ROOT%{clip_dir}/build |
73 |
|
74 |
find $RPM_BUILD_ROOT%{clip_dir} -name '*bat' -type f -exec rm '{}' \; |
75 |
find $RPM_BUILD_ROOT%{clip_dir} -type f -exec chmod 644 '{}' \; |
76 |
|
77 |
# clean broken files |
78 |
install %{SOURCE1} . |
79 |
chmod +x ./clean-up-sources.sh |
80 |
DESTDIR=$RPM_BUILD_ROOT ./clean-up-sources.sh %{clip_dir} |
81 |
|
82 |
%clean |
83 |
rm -rf $RPM_BUILD_ROOT |
84 |
|
85 |
%files |
86 |
%defattr(-,root,root) |
87 |
%clip_dir |
88 |
%doc README AUTHORS ChangeLog INSTALL LICENSE NEWS |
89 |
|
90 |
|
91 |
|
92 |
|