1 # Contributor: Darwin Bautista <djclue917@gmail.com>
3 pkgname=kdeicons-oxygen-svn
6 pkgdesc="The KDE 4 icon theme"
8 url="http://www.oxygen-icons.org/"
9 license=('LGPL' 'custom:CC by-sa 3.0')
10 makedepends=('bc' 'imagemagick' 'inkscape' 'subversion')
11 install=kdeicons-oxygen-svn.install
12 source=(http://websvn.kde.org/*checkout*/trunk/playground/artwork/Oxygen/utils/index.theme?pathrev=674297 \
13 http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/pics/oxygen/COPYING?pathrev=651879 \
14 http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/pics/oxygen/AUTHORS?pathrev=643003 \
15 http://websvn.kde.org/*checkout*/trunk/KDE/kdelibs/pics/oxygen/scalable/devices/dvd-unmount.svg?pathrev=670000 \
16 http://websvn.kde.org/*checkout*/trunk/KDE/kdebase/runtime/pics/oxygen/scalable/apps/ark.svgz?pathrev=707333 \
17 http://websvn.kde.org/*checkout*/trunk/KDE/kdebase/runtime/pics/oxygen/scalable/apps/konsole.svgz?pathrev=706969 \
18 http://websvn.kde.org/*checkout*/trunk/KDE/kdebase/runtime/pics/oxygen/scalable/apps/korganizer.svgz?pathrev=707384 \
20 missing_icons.tar.gz \
24 generate_oxy_theme.sh \
25 no_huge_action_icons.patch \
27 noextract=(ark.svgz?pathrev=707333 \
28 konsole.svgz?pathrev=706969 \
29 korganizer.svgz?pathrev=707384)
30 md5sums=('d17bac734c52d888abc9feab210e5789'
31 'f3e5498dea1ce1298cdff5be2c05e6fc'
32 '40b9c7d79778553cb690f92778c0d575'
33 '02b5a7a17b925e4866e502535ba3426c'
34 '51da52df4f3056dc5586466a057f3c78'
35 '4326a0f3652a763d2e5f33948acd62b2'
36 'c077bd392c95cf8600e4e6149bb1668e'
37 '94afaee1146dc8d052dbda1e1b69e32a'
38 'aef49dd8526827c361f244fd8ec72342'
39 '43ca21c86af99813c32a72e2ba83c128'
40 'fe18774687db8d535b52a828688c72b1'
41 '151879de99ce802c99e6403bd972a60e'
42 '9a21e6174453dd6806b509b73f243078'
43 '80f4d70a9804840aa67e16338625c9d3'
44 '4ac551652d595240a474c7dc571b8c40')
48 _svntrunk=svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/runtime/pics/oxygen
54 # Checkout SVN repository
55 msg "Checking out SVN repository..."
56 svn co ${_svntrunk}/${_svnmod}@${pkgver} --config-dir ./ -r ${pkgver} ${_svnmod}
58 msg "SVN checkout finished or server timed out..."
60 cd ${startdir}/src/scalable/
62 install -m755 ../{generate_oxy_theme.sh,dash2underscore.sh,rename-icons.py} .
65 # Remove some inconsistent small versions of icons
66 rm apps/small/16x16/{basket,kate,kget,kmail,knotes,konqueror,kwrite}.svgz
67 rm apps/small/22x22/{basket,kget,none}.svgz
68 rm devices/small/16x16/{computer,drive-harddisk,video-display}.svgz
70 # Delete duplicate/obsolete files
71 rm -f mimetypes/{,small/{16x16,22x22}/}audio-x-monkey.svgz
72 rm -f places/{,small/{16x16,22x22,32x32}/}link.svgz
74 rm mimetypes/application-x-ar.svgz
76 rm -f mimetypes/{,small/{16x16,22x22}/}text-x-adasrc.svgz
78 rm -f mimetypes/{,small/{16x16,22x22}/}application-pdf.svgz
80 rm -f mimetypes/{,small/{16x16,22x22}/}{application-{relaxng,x-mswinurl,xhtml+xml,xslt+xml,xml,xsd},text-{mathml,vnd.wap.wml,x-dtd,x-xslfo,xml}}.svgz
82 rm -f mimetypes/{,small/{16x16,22x22}/}application-vnd.ms-word.svgz
84 rm -f mimetypes/{,small/{16x16,22x22}/}application-vnd.{ms-powerpoint,oasis.opendocument.presentation-template}.svgz
86 rm -f mimetypes/{,small/{16x16,22x22}/}application-vnd.ms-excel.svgz
88 rm -f mimetypes/{,small/{16x16,22x22}/}uri-*.svgz
90 rm -f mimetypes/{,small/{16x16,22x22}/}{message-news,text-rdf}.svgz
92 rm -f mimetypes/{,small/{16x16,22x22}/}text-{css,csv,enriched,sgml,x-patch}.svgz
94 rm -f mimetypes/{,small/{16x16,22x22}/}{application-x-tgif,image-svg+xml-compressed}.svgz
96 rm -f mimetypes/{,small/{16x16,22x22}/}audio-x-wav.svgz
98 rm -f mimetypes/{,small/{16x16,22x22}/}none.svgz
101 # Rename icons back to old names
102 msg "Renaming icons... Ignore any error below..."
106 # Fix after mass rename
107 mv actions/viewmag_.svgz actions/viewmag-.svgz
110 mv places filesystems
111 mv status/trashcan_full.svgz filesystems/
112 mv status/dialog-*.svgz actions/
113 mv categories/{package_*,personal}.svgz apps/
114 mv emblems/emblem_symbolic_link.svgz filesystems/link.svgz
115 mv emblems/small/16x16/emblem_link.svgz filesystems/small/16x16/link.svgz
116 mv emblems/small/22x22/emblem_link.svgz filesystems/small/22x22/link.svgz
119 rm filesystems/folder_{home,tar}.svgz
120 mv ${startdir}/src/folder_home.svg filesystems/
121 mv ${startdir}/src/folder_tar.svg filesystems/
124 mv ${startdir}/src/dvd-unmount.svg?pathrev=* devices/dvd_unmount.svg
125 mv ${startdir}/src/ark.svgz?pathrev=* apps/ark.svgz
126 mv ${startdir}/src/konsole.svgz?pathrev=* apps/konsole.svgz
127 mv ${startdir}/src/korganizer.svgz?pathrev=* apps/korganizer.svgz
128 mv ${startdir}/src/lockoverlay.svg filesystems/
129 mv ${startdir}/src/{colorize,idea,unlock,wizard}.svg actions/
130 cp filesystems/folder.svgz filesystems/folder_empty.svgz
131 cp mimetypes/font_truetype.svgz mimetypes/font.svgz
132 cp actions/contents.svgz actions/help.svgz
133 cp actions/rotate_cw.svgz actions/rotate_right.svgz
134 cp actions/rotate_ccw.svgz actions/rotate_left.svgz
135 cp filesystems/start_here.svgz apps/kmenu.svgz
137 # Remove unneeded icons
138 rm mimetypes/folder.svgz
139 rm mimetypes/application_x_marble.svgz
141 # Convert the SVGs to usable PNGs
142 ./generate_oxy_theme.sh . ${startdir}/pkg/opt/kde/share/icons/oxygen
144 msg "Generating mounted versions of device icons and fixing link overlays"
145 for _size in 16 22 32 48 64 128; do
146 cd "${startdir}/pkg/opt/kde/share/icons/oxygen/${_size}x${_size}/devices/"
148 if [ "${_size}" = "16" ]; then
149 _svg=${startdir}/src/scalable/emblems/small/11x11/emblem_mounted.svgz
150 elif [ "${_size}" = "22" ]; then
151 _svg=${startdir}/src/scalable/emblems/small/16x16/emblem_mounted.svgz
152 elif [ "${_size}" = "32" ]; then
153 _svg=${startdir}/src/scalable/emblems/small/22x22/emblem_mounted.svgz
155 _svg=${startdir}/src/scalable/emblems/emblem_mounted.svgz
158 inkscape --without-gui --export-background-opacity=0 --export-dpi=90 --file=${_svg} --export-png=mounted.png >& /dev/null
160 _resize=`echo "${_size}*0.625" | bc`
161 _geom=`echo "${_size}*0.429" | bc`
163 for _device in `ls *_unmount.png`; do
164 composite -filter Sinc -resize "${_resize}x${_resize}" -depth 8 mounted.png -geometry "+${_geom}+${_geom}" ${_device} ${_device%_unmount.png}_mount.png
169 cd "${startdir}/pkg/opt/kde/share/icons/oxygen/${_size}x${_size}/filesystems/"
170 convert -resize "${_size}x${_size}" -depth 8 ${startdir}/src/transparent.png trans.png
171 composite -filter Sinc -resize "${_resize}x${_resize}" -depth 8 link.png -geometry "+${_geom}+${_geom}" trans.png link.png
175 install -D -m644 ${startdir}/src/index.theme?pathrev=674297 ${startdir}/pkg/opt/kde/share/icons/oxygen/index.theme
176 install -m644 ${startdir}/src/AUTHORS?pathrev=643003 ${startdir}/pkg/opt/kde/share/icons/oxygen/AUTHORS
177 install -D -m644 ${startdir}/src/COPYING?pathrev=651879 ${startdir}/pkg/usr/share/licenses/${pkgname}/license.txt
178 patch -Np0 -d ${startdir}/pkg/opt/kde/share/icons/oxygen -i ${startdir}/src/no_huge_action_icons.patch
181 # vim:set ts=2 sw=2 et: