summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 001a8b3b5c97d2ffe5ebc16d9f9217cdbf5a8fc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
# Maintainer: √Čtienne Deparis <etienne@depar.is>
# Contributor: b.r
# Contributor: Charles Bos <charlesbos1 AT gmail>
# Contributor: Shawn Dellysse <sdellysse@radford.edu>

pkgname=bluecurve-icon-theme
pkgver=8.0.2
pkgrel=28
_md5=3a3ecac0922f964bb1c4be617e8dec37

pkgdesc="Red Hat Icons from Fedora 10"
arch=('any')
url="https://fedorahosted.org/bluecurve/"
license=('GPL')
groups=('redhat-artwork')
makedepends=('python' 'perl-xml-simple' 'intltool')
optdepends=('gnome-icon-theme: for inheriting missing icons')
options=(!emptydirs)

source=("https://src.fedoraproject.org/repo/pkgs/$pkgname/$pkgname-$pkgver.tar.bz2/${_md5}/$pkgname-$pkgver.tar.bz2")
md5sums=("$_md5")

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  msg2 "Run autoreconf & autoupdate (allows more architecture)"
  autoreconf -fi
  autoupdate
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  msg2 "Run make"

  ./configure --prefix="$pkgdir/usr"
  make

  cd theme

  msg2 "Aliases Bluecurve to Bluecurve8"

  # This is to avoid conflicts with community xcursor-bluecurve package
  mv Bluecurve Bluecurve8
  sed -i "s/^Name=Bluecurve$/Name=Bluecurve8/" Bluecurve8/index.theme
  sed -i 's/name="Bluecurve"/name="Bluecurve8"/' Bluecurve8/Bluecurve.cursortheme
  mv Bluecurve8/Bluecurve.cursortheme Bluecurve8/Bluecurve8.cursortheme

  msg2 "Remove now useless Makefiles"

  for theme in Bluecurve8 Bluecurve-inverse LBluecurve LBluecurve-inverse; do
    find . -type f -name "Makefile*" -exec rm {} \;
    find . -type f -name "*.in" -exec rm {} \;
    find . -type f -name "*.icon" -exec rm {} \;
  done

  cd Bluecurve8

  msg2 "Patch index.theme and symlink.manifest"

  sed -i "s/^Context=FileSystems$/Context=Places/" index.theme
  sed -i "s|^\[\(.*\)/status\]$|[\1/status]\nContext=Status|" index.theme
  sed -i "/^[0-9x]*\/apps\/icon-system-settings.png /d" symlink.manifest

  for size in 16x16 20x20 24x24 32x32 36x36 48x48 64x64 96x96; do
    for folder in actions devices filesystems status; do
      [ ! -d "$size/$folder" ] && mkdir "$size/$folder"
    done
    for icon in $(find "$size/apps" -type f -name 'gpm-*'); do
      mv $icon $size/status/
    done
    [ -f "$size/status/gpm-hibernate.png" ] && mv $size/status/gpm-hibernate.png $size/actions/
    [ -f "$size/status/gpm-suspend.png" ] && mv $size/status/gpm-suspend.png $size/actions/
    [ -f "$size/status/gpm-ac-adapter" ] && mv $size/status/gpm-ac-adapter.png $size/apps/
    [ -f "$size/status/gpm-brightness.png" ] && mv $size/status/gpm-brightness.png $size/apps/

    ## Uncomment the following lines to use the Red Hat logo instead of
    ## default gnome foot
    # echo "$size/filesystems/start-here.png ../apps/redhat-icon-panel-menu.png" >> symlink.manifest
    # echo "$size/filesystems/distributor-logo.png ../apps/redhat-icon-panel-menu.png" >> symlink.manifest
    ## Uncomment the following lines for some more customization
    # echo "$size/apps/thunderbird.png email.png" >> symlink.manifest
    # echo "$size/apps/firefox.png galeon.png" >> symlink.manifest
    # echo "$size/apps/cliqz.png galeon.png" >> symlink.manifest
    # echo "$size/apps/chromium.png galeon.png" >> symlink.manifest
    echo "$size/filesystems/user-desktop.png ../apps/desktop.png" >> symlink.manifest
    echo "$size/filesystems/folder-download.png ../actions/fileimport.png" >> symlink.manifest
    echo "$size/filesystems/network-server.png ../apps/icon-network-systems.png" >> symlink.manifest
    echo "$size/filesystems/network-workgroup.png ../apps/icon-network-systems.png" >> symlink.manifest
    echo "$size/filesystems/network-wired.png ../apps/applications-internet.png" >> symlink.manifest
    echo "$size/status/battery-good-charging.png gpm-primary-080-charging.png" >> symlink.manifest
    echo "$size/status/battery-full-charging.png gpm-primary-100-charging.png" >> symlink.manifest
    echo "$size/status/battery-full-charged.png gpm-primary-100-charged.png" >> symlink.manifest
    echo "$size/status/battery-full.png gpm-primary-100.png" >> symlink.manifest
    echo "$size/status/battery-missing.png gpm-primary-missing.png" >> symlink.manifest
    echo "$size/status/battery-good.png gpm-primary-080.png" >> symlink.manifest
    echo "$size/status/battery-low.png gpm-primary-020.png" >> symlink.manifest
    echo "$size/status/battery-empty.png gpm-primary-010.png" >> symlink.manifest
    echo "$size/status/battery-low-charging.png gpm-primary-020-charging.png" >> symlink.manifest
    echo "$size/actions/system-shutdown.png connect_no.png" >> symlink.manifest
    echo "$size/actions/system-search.png ../apps/gnome-searchtool.png" >> symlink.manifest
    echo "$size/actions/system-run.png ../apps/gnome-run.png" >> symlink.manifest
    echo "$size/apps/icon-system-settings.png icon-settings.png" >> symlink.manifest
    echo "$size/apps/caja.png file-manager.png" >> symlink.manifest
    echo "$size/apps/system-file-manager.png file-manager.png" >> symlink.manifest
    echo "$size/apps/caja_home.png ../mimetypes/user-home.png" >> symlink.manifest
    echo "$size/apps/lightdm-gtk-greeter-settings.png gdm.png" >> symlink.manifest
    echo "$size/apps/mate-network-properties.png icon-network-systems.png" >> symlink.manifest
    echo "$size/apps/multimedia-volume-control.png gnome-grecord.png" >> symlink.manifest
    echo "$size/apps/mate-power-manager.png ../status/gpm-primary-100-charging.png" >> symlink.manifest
    echo "$size/apps/preferences-system-windows.png gnome-ccwindowmanager.png" >> symlink.manifest
    echo "$size/apps/preferences-system-time.png gnome-clock.png" >> symlink.manifest
    echo "$size/apps/mate-preferences-desktop-display.png display-capplet.png" >> symlink.manifest
    echo "$size/apps/preferences-desktop-screensaver.png icon-xscreensaver.png" >> symlink.manifest
    echo "$size/apps/preferences-desktop-display.png display-capplet.png" >> symlink.manifest
    echo "$size/apps/preferences-desktop-peripherals.png gnome-ccperiph.png" >> symlink.manifest
    echo "$size/apps/preferences-desktop-keyboard-shortcuts.png gnome-settings-keybindings.png" >> symlink.manifest
    echo "$size/apps/preferences-desktop-default-applications.png 500_setup.png" >> symlink.manifest
    echo "$size/apps/display.png display-capplet.png" >> symlink.manifest
    echo "$size/apps/mate-run.png gnome-run.png" >> symlink.manifest
    echo "$size/apps/mate-notification-properties.png gaim.png" >> symlink.manifest
    echo "$size/apps/applications-other.png 500_setup.png" >> symlink.manifest
    echo "$size/apps/mozo.png gnome-panel.png" >> symlink.manifest
    echo "$size/apps/alacarte.png gnome-panel.png" >> symlink.manifest
    echo "$size/apps/mate-panel.png gnome-panel.png" >> symlink.manifest
    echo "$size/apps/mate-system-log.png gnome-log.png" >> symlink.manifest
    echo "$size/apps/mate-session-properties.png gnome-session.png" >> symlink.manifest
    echo "$size/apps/user-info.png icon-user-id.png" >> symlink.manifest
    echo "$size/apps/utilities-terminal.png gnome-color-xterm.png" >> symlink.manifest
    echo "$size/apps/mate-power-statistics.png utilities-system-monitor.png" >> symlink.manifest
    echo "$size/apps/emacs.png accessories-text-editor.png" >> symlink.manifest
    echo "$size/apps/nitrogen.png preferences-desktop-wallpaper.png" >> symlink.manifest
    echo "$size/apps/gajim.png gaim.png" >> symlink.manifest
    echo "$size/apps/glade.png glade-2.png" >> symlink.manifest
    echo "$size/apps/zeal.png accessories-dictionary.png" >> symlink.manifest
    echo "$size/apps/net.poedit.Poedit.png preferences-desktop-locale.png" >> symlink.manifest
    echo "$size/apps/org.gnome.seahorse.Application.png icon-security-keys.png" >> symlink.manifest
    echo "$size/apps/org.gnome.SimpleScan.png ../mimetypes/scanner.png" >> symlink.manifest
    echo "$size/apps/libreoffice-startcenter.png applications-office.png" >> symlink.manifest
    echo "$size/apps/libreoffice-writer.png openofficeorg-writer.png" >> symlink.manifest
    echo "$size/apps/libreoffice-calc.png openofficeorg-calc.png" >> symlink.manifest
    echo "$size/apps/libreoffice-math.png openofficeorg-math.png" >> symlink.manifest
    echo "$size/apps/libreoffice-base.png openofficeorg-base.png" >> symlink.manifest
    echo "$size/apps/libreoffice-impress.png openofficeorg-impress.png" >> symlink.manifest
    echo "$size/apps/libreoffice-draw.png openofficeorg-draw.png" >> symlink.manifest
    echo "$size/apps/mate-brightness-applet.png gpm-brightness.png" >> symlink.manifest
    echo "$size/apps/mate-panel-clock.png gnome-clock.png" >> symlink.manifest
    echo "$size/apps/mate-panel-launcher.png icon-launcher.png" >> symlink.manifest
    echo "$size/apps/mate-cpu-frequency-applet.png icon-memory-profile.png" >> symlink.manifest
    echo "$size/apps/mate-netspeed-applet.png icon-traceroute.png" >> symlink.manifest
    echo "$size/apps/mate-panel-window-menu.png gnome-ccwindowmanager.png" >> symlink.manifest
    echo "$size/apps/mate-panel-window-list.png gnome-ccwindowmanager.png" >> symlink.manifest
    echo "$size/apps/mate-invest-applet.png utilities-system-monitor.png" >> symlink.manifest
    echo "$size/apps/mate-panel-workspace-switcher.png display-capplet.png" >> symlink.manifest
    echo "$size/apps/mate-inhibit-applet.png ../actions/gpm-suspend.png" >> symlink.manifest
    echo "$size/devices/ac-adapter.png ../apps/gpm-ac-adapter.png" >> symlink.manifest
    echo "$size/devices/battery.png ../status/gpm-primary-100-charging.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-drawing.png openofficeorg-drawing.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-presentation-template.png openofficeorg-presentation-template.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-text-template.png openofficeorg-oasis-text-template.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-presentation.png openofficeorg-presentation.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-spreadsheet-template.png openofficeorg-spreadsheet-template.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-drawing.png openofficeorg-oasis-drawing.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-text.png openofficeorg-oasis-text.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-web-template.png openofficeorg-oasis-web-template.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-spreadsheet.png openofficeorg-oasis-spreadsheet.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-presentation.png openofficeorg-oasis-presentation.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-text-template.png openofficeorg-text-template.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-master-document.png openofficeorg-oasis-master-document.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-spreadsheet.png openofficeorg-spreadsheet.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-text.png openofficeorg-text.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-drawing-template.png openofficeorg-drawing-template.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-drawing-template.png openofficeorg-oasis-drawing-template.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-spreadsheet-template.png openofficeorg-oasis-spreadsheet-template.png" >> symlink.manifest
    echo "$size/mimetypes/libreoffice-oasis-presentation-template.png openofficeorg-oasis-presentation-template.png" >> symlink.manifest
    for icon in $(find $size/status -type f -name 'gpm-primary*' -printf "%f\n"); do
      echo "$size/status/${icon/primary/battery} $icon" >> symlink.manifest
    done
    if [ -d $size/stock ]; then
      echo "$size/apps/applications-science.png ../stock/panel-launcher.png" >> symlink.manifest
      echo "$size/apps/package_science.png ../stock/panel-launcher.png" >> symlink.manifest
      echo "$size/apps/mate-panel-drawer.png ../stock/panel-drawer.png" >> symlink.manifest
      echo "$size/apps/mate-eyes-applet.png ../stock/panel-amusements.png" >> symlink.manifest
      echo "$size/apps/mate-panel-fish.png ../stock/panel-amusements.png" >> symlink.manifest
      echo "$size/apps/mate-panel-notification-area.png ../stock/dialog-information.png" >> symlink.manifest
      echo "$size/apps/mate-panel-force-quit.png ../stock/dialog-cancel.png" >> symlink.manifest
      echo "$size/status/battery-caution-charging.png ../stock/dialog-warning.png" >> symlink.manifest
      echo "$size/status/battery-caution.png ../stock/dialog-warning.png" >> symlink.manifest
    fi
    # XFCE
    echo "$size/apps/org.xfce.appfinder.png gnome-run.png" >> symlink.manifest
    echo "$size/apps/org.xfce.volman.png ../devices/gnome-dev-harddisk-usb.png" >> symlink.manifest
    echo "$size/apps/org.xfce.webbrowser.png galeon.png" >> symlink.manifest
    echo "$size/apps/org.xfce.taskmanager.png utilities-system-monitor.png" >> symlink.manifest
    echo "$size/apps/org.xfce.workspaces.png display-capplet.png" >> symlink.manifest
    echo "$size/apps/xfce4-fsguard-plugin-urgent.png ../stock/dialog-error.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.keyboard.png preferences-desktop-keyboard.png" >> symlink.manifest
    echo "$size/apps/org.xfce.ScreenSaver.png icon-xscreensaver.png" >> symlink.manifest
    echo "$size/apps/xfce4-netload-plugin.png icon-traceroute.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.editor.png gconf-editor.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.manager.png preferences-system.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.accessibility.png preferences-desktop-accessibility.png" >> symlink.manifest
    echo "$size/apps/org.xfce.mailreader.png email.png" >> symlink.manifest
    echo "$size/apps/org.xfce.terminalemulator.png gnome-color-xterm.png" >> symlink.manifest
    echo "$size/apps/xfce4-weather.png ../status/weather-few-clouds.png" >> symlink.manifest
    echo "$size/apps/org.xfce.thunar.png file-manager.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.display.png display-capplet.png" >> symlink.manifest
    echo "$size/apps/org.xfce.xfwm4-tweaks.png gnome-ccwindowmanager.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.color.png applications-graphics.png" >> symlink.manifest
    echo "$size/apps/org.xfce.filemanager.png file-manager.png" >> symlink.manifest
    echo "$size/apps/xfce4-fsguard-plugin.png ../mimetypes/drive-harddisk.png" >> symlink.manifest
    echo "$size/apps/xfce4-cpufreq-plugin.png icon-memory-profile.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.applicationsmenu.png ../stock/panel-drawer.png" >> symlink.manifest
    echo "$size/apps/xfce4-cpugraph-plugin.png utilities-system-monitor.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.default-applications.png 500_setup.png" >> symlink.manifest
    echo "$size/apps/xfce4-pulseaudio-plugin.png preferences-desktop-multimedia.png" >> symlink.manifest
    echo "$size/apps/org.xfce.notification.png gaim.png" >> symlink.manifest
    echo "$size/apps/xfce4-clipman-plugin.png icon-clipboard.png" >> symlink.manifest
    echo "$size/apps/xfce-sensors.png icon-memory-profile.png" >> symlink.manifest
    echo "$size/apps/org.xfce.about.png ../stock/help-about.png" >> symlink.manifest
    echo "$size/apps/org.xfce.genmon.png utilities-system-monitor.png" >> symlink.manifest
    echo "$size/apps/org.xfce.xfwm4.png gnome-ccwindowmanager.png" >> symlink.manifest
    echo "$size/apps/org.xfce.powermanager.png ../status/gpm-primary-100-charging.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.png gnome-panel.png" >> symlink.manifest
    echo "$size/apps/org.xfce.xfdesktop.png desktop.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.appearance.png preferences-desktop-theme.png" >> symlink.manifest
    echo "$size/apps/org.xfce.settings.mouse.png input-mouse.png" >> symlink.manifest
    echo "$size/apps/xfce4-fsguard-plugin-warning.png ../stock/dialog-warning.png" >> symlink.manifest
    echo "$size/apps/org.xfce.session.png icon-launcher.png" >> symlink.manifest
    echo "$size/apps/xfce-schedule.png clock.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.clock gnome-clock.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.tasklist gnome-ccwindowmanager.png" >> symlink.manifest
    echo "$size/apps/xfce4-battery-plugin ../status/gpm-primary-100-charging.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.launcher icon-launcher.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.actions ../stock/application-exit.png" >> symlink.manifest
    #echo "$size/apps/org.xfce.panel.separator" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.windowmenu gnome-ccwindowmanager.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.directorymenu ../mimetypes/folder.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.showdesktop desktop.png" >> symlink.manifest
    echo "$size/apps/xfce4-notes-plugin ../actions/attach.png" >> symlink.manifest
    echo "$size/apps/org.xfce.panel.pager display-capplet.png" >> symlink.manifest
  done

  msg2 "Apply symlink.manifest"

  cat > read_manifest.py <<PYSCRIPT
import os

manifest = []
with open('symlink.manifest') as f:
    manifest = f.readlines()
curpwd = os.getcwd()
for linkdata in manifest:
    link = linkdata.strip().split(' ')
    if link[1].endswith('.icon'):
       continue
    goto = os.path.dirname(link[0])
    target = os.path.basename(link[0])
    try:
        os.chdir(goto)
        if not os.path.exists(link[1]):
            raise FileNotFoundError(
                "[Errno 2] No such file or directory: '{}'".format(link[1])
            )
        os.symlink(link[1], target)
    except FileExistsError as e:
        print(e)
    except FileNotFoundError as e:
        # print("{} in {}".format(str(e), os.getcwd()))
        pass
    os.chdir(curpwd)
PYSCRIPT
  python read_manifest.py
  rm read_manifest.py symlink.manifest

  # Prefer old watch cursor
  rm cursors/watch
  mv cursors/_watch-old_ cursors/watch

  # Remove broken links if any
  find -L . -type l -exec rm {} \;

}

package() {
  install -d -m755 $pkgdir/usr/share/icons
  install -d -m755 $pkgdir/usr/share/licenses/$pkgname

  cd $srcdir/$pkgname-$pkgver

  install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
  install -D -m644 AUTHORS $pkgdir/usr/share/licenses/$pkgname/AUTHORS

  for theme in Bluecurve8 Bluecurve-inverse LBluecurve LBluecurve-inverse; do
    cp -R theme/$theme $pkgdir/usr/share/icons/
  done
}

# Local Variables:
# sh-basic-offset: 2
# End: