updated on Wed Jan 25 20:08:56 UTC 2012
[aur-mirror.git] / fbsplash-themes-arch-banner / PKGBUILD
blob6753c70fa5887be7144de924a27cdd7b8cc5a01b
1 #!/bin/bash
3 # Maintainer: Kurt J. Bosch <kjb-temp-2009 at alpenjodel.de>
5 pkgdesc="Fbsplash themes with Arch Linux banner logos"
6 pkgname=fbsplash-themes-arch-banner
7 pkgver=1.5
8 pkgrel=2
10 _screen_sizes=(
11 640x480 800x600 1024x768 1152x864 1152x900 1280x960 1280x1024 1400x1050 1600x1200
12 1280x720 1280x768 1280x800 1280x854 1366x768 1440x900 1680x1050 1920x1080 1920x1200
14 arch=('any')
15 license=("GPL" "CCPL:cc-by-nc-sa" "custom:ArchLinux-trademarks" "custom:Vera-copyright")
16 _theme_license="CCPL:cc-by-nc-sa, Arch Linux Trademarks, Bitstream Vera Fonts Copyright"
17 url="http://aur.archlinux.org/packages.php?ID=26966"
18 depends=(
19 'fbsplash'
21 makedepends=(
22 'archlinux-artwork>=1.6' 'ttf-dejavu' 'ttf-liberation'
23 'imagemagick' 'librsvg'
25 optdepends=(
26 'fbsplash-extras: Show icons for daemons and pseudo-services'
27 'tango-icon-theme: Default configuration icons for services/daemons'
28 'uswsusp-fbsplash: Suspend/resume with Fbsplash'
30 conflicts=( ${pkgname}-{common,normal,wide,icons,noicons} )
31 replaces=( ${pkgname}-{common,normal,wide,icons,noicons} )
32 backup=( etc/splash/arch-banner-icons/icons.conf )
33 install=INSTALL
34 changelog=CHANGELOG
35 _font=Vera.ttf
36 _vera_ver=1.10
37 source=(
38 make-theme.sh
39 icons.conf
40 cache-icons
41 svc_event
42 http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/${_vera_ver}/ttf-bitstream-vera-${_vera_ver}.tar.bz2
43 Screenshot-noicons.png
44 Screenshot-noicons-error.png
45 Screenshot-icons-Tango.png
46 Screenshot-icons-Tango-error.png
47 Screenshot-grad1-Tango.png
48 Screenshot-grad2-Tango.png
49 Screenshot-mono-Tango.png
50 Screenshot-outline-Tango.png
52 _font_size=13
53 # daemon icons to use - also change values in cache-icons and comments in icons.conf !
54 _icon_size=32
55 _icon_size_small=16
56 _lib_dir=/lib/splash/arch-banner
58 build() {
59 cd "${srcdir}"
61 rm -rf build
62 mkdir build
63 cd build
65 # get in font file
66 cp -a ../ttf-bitstream-vera-${_vera_ver}/${_font} ${_font}
68 local args=( $_font $_font_size $_lib_dir ${pkgver} "${url}" "${_theme_license}" "${_screen_sizes[@]}" )
70 # Light blue themes
71 # Keep the old noicons/icons theme names for backward compatibility !
73 local flavour=official
74 local theme_name="arch-banner-icons"
75 msg2 "Creating theme: ${theme_name}"
76 ../make-theme.sh $theme_name $flavour light blue mono $_icon_size "${args[@]}"
77 install -D ../icons.conf arch-banner-icons/icons.conf
79 local theme_name="arch-banner-noicons"
80 msg2 "Creating theme: ${theme_name}"
81 mkdir "${theme_name}"
82 cd "${theme_name}"
83 ln -s ../arch-banner-icons/* ./
84 rm -f icons.conf scripts
85 cd ..
87 local flavour
88 for flavour in grad1 grad2; do
89 local theme_name="arch-banner-${flavour}"
90 msg2 "Creating theme: ${theme_name}"
91 ../make-theme.sh $theme_name $flavour light blue mono $_icon_size "${args[@]}"
92 ln -s ../arch-banner-icons/{icons.conf,scripts} $theme_name/
93 done
95 # White themes
97 # local flavour
98 # for flavour in mono outline; do
99 # local theme_name="arch-banner-${flavour}"
100 # msg2 "Creating theme: ${theme_name}"
101 # ../make-theme.sh $theme_name $flavour white white $flavour $_icon_size "${args[@]}"
102 # ln -s ../arch-banner-icons/{icons.conf,scripts} $theme_name/
103 # done
106 package() {
107 msg2 "Installing theme files"
108 mkdir -p "${pkgdir}"/etc/splash
109 mkdir -p "${pkgdir}"$_lib_dir
110 cd "${srcdir}"/build
111 local file
112 for file in *; do
113 case $file
114 in arch-banner-* ) cp -a "$file" "${pkgdir}"/etc/splash/
115 ;; * ) cp -a "$file" "${pkgdir}"$_lib_dir/
116 esac
117 done
118 # fix permissions
119 find "${pkgdir}" -type f -exec chmod 644 {} \;
121 msg2 "Installing hook scripts"
122 cd "${pkgdir}"/etc/splash/arch-banner-icons
123 mkdir scripts
124 cd scripts
125 install -m755 "${srcdir}"/{cache-icons,svc_event} .
126 ln -sT cache-icons rc_init-pre
127 ln -sT cache-icons rc_init-post
128 local hook
129 for hook in \
130 svc_{start,started,start_failed}-pre \
131 svc_{stop,stopped,stop_failed}-pre # svc_inactive_{start,stop}-pre
133 # with fbsplash-extras we support hooks sourcing for speed up
134 ln -sT svc_event ${hook}.sh
135 # old style executable hooks are still needed for splash_manager replay
136 ln -sT svc_event ${hook}
137 done
139 msg2 "Installing screenshots"
140 mkdir -p "${pkgdir}"/usr/share/doc/${pkgname}
141 cd "${pkgdir}"/etc/splash/
142 local theme_name
143 for theme_name in arch-banner-*; do
144 if [[ $theme_name = *-noicons ]]
145 then install -m644 "${srcdir}"/Screenshot-${theme_name#arch-banner-}.png "${pkgdir}"/usr/share/doc/${pkgname}/
146 else install -m644 "${srcdir}"/Screenshot-${theme_name#arch-banner-}-Tango.png "${pkgdir}"/usr/share/doc/${pkgname}/
148 local file
149 for file in ${theme_name}/images/verbose*.png; do # prefere 1024x786 or bigger
150 ln -s /etc/splash/"${file}" "${pkgdir}"/usr/share/doc/${pkgname}/Verbose-background-${theme_name}.png
151 break
152 done
153 done
154 install -m644 "${srcdir}"/Screenshot-icons-Tango-error.png "${pkgdir}"/usr/share/doc/${pkgname}/
156 msg2 "Installing license files"
157 mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
158 cd "${pkgdir}"/usr/share/licenses/${pkgname}
159 install -m644 /usr/share/licenses/archlinux-artwork/TRADEMARKS ArchLinux-trademarks
160 install -m644 "${srcdir}"/ttf-bitstream-vera-${_vera_ver}/COPYRIGHT.TXT Vera-copyright
163 md5sums=('0551e365b0d567ea352de31d87fdb73a'
164 'ac3e7357fd1b2c4738b15a7b8ac64f67'
165 '93a0bebf9fff277ecb94023ffb2d086c'
166 '942e1fdbe0e4b71621d8e2dabcb28d2c'
167 'bb22bd5b4675f5dbe17c6963d8c00ed6'
168 '0a2567cbc3e934df5055401db7047628'
169 '0cacfc60921b67dc86010c55033329ea'
170 'a33671a6c41615949b049b434e74fc63'
171 '608624f70a822d2a819a33b66137c9b2'
172 '19aa8a643aa379fc9296c44b4ecfa510'
173 '5370461c7914ef566b711c5ce1e65add'
174 '804f10c7a6efc7664c799a89274cb25b'
175 '9674d83e6a3d632d3e24c3942ee98a5e')