sed -i -e 's#^\(Directories=.*\)$#\1,scalable/actions,scalable/apps,scalable/devices,scalable/emblems,scalable/mimetypes,scalable/places,scalable/status#' index.theme
cat >>index.theme <<EOF
[scalable/actions]
Size=16
MinSize=16
MaxSize=256
Context=Actions
Type=Scalable
[scalable/apps]
Size=16
MinSize=16
MaxSize=256
Context=Applications
Type=Scalable
[scalable/devices]
Size=16
MinSize=16
MaxSize=256
Context=Devices
Type=Scalable
[scalable/emblems]
Size=16
MinSize=16
MaxSize=256
Context=Emblems
Type=Scalable
[scalable/mimetypes]
Size=16
MinSize=16
MaxSize=256
Context=Mimetypes
Type=Scalable
[scalable/places]
Size=16
MinSize=16
MaxSize=256
Context=Places
Type=Scalable
[scalable/status]
Size=16
MinSize=16
MaxSize=256
Context=Status
Type=Scalable
EOF
)
(cd $RPM_BUILD_ROOT%{_datadir}
echo "%%defattr(-,root,root)"
find icons/gnome -name "gtk-\*" -or -not -type l -printf "%%%%{_datadir}/%%p\n"