updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / oxygen-molecule-theme / PKGBUILD
blobc7058a3bfd8e809c100bba677fe79cf5a5f806fa
1 # Maintainer: Dylon Edwards <deltaecho@archlinux.us>
3 pkgname=oxygen-molecule-theme
4 pkgver=3.2
5 pkgrel=1
6 _kdever=44
7 _colors=3.0
9 pkgdesc="A KDE4 Oxygen theme for GTK+ apps."
10 url="http://kde-look.org/content/show.php/Oxygen-Molecule+KDE+%26+GTK%2B+unified+theme?content=103741"
11 license=('GPL')
13 arch=('i686' 'x86_64')
15 depends=('gtk2' 'qt' 'oxygen-icons')
16 provides=("${pkgname}=${pkgver}")
18 source=("http://kde-look.org/CONTENT/content-files/103741-Oxygen-Molecule_${pkgver}_theme.tar.gz")
19 md5sums=('90e852de1ab202fa0dafb038b829846d')
21 function create_install() {
22 cat > "${startdir}/${pkgname}.install" <<EOF
23 post_install() {
24         cat <<-'EOF'
25                 ################################################################################
26                 #  In order to use this theme, you will need to modify (please backup the file
27                 #+ first) or create the \`.gtkrc-2.0' file in your \$HOME directory with the 
28                 #+ following (Adjust the font name and size to your liking):
30                 include "/usr/share/themes/kde${_kdever}-oxygen-molecule/gtk-2.0/gtkrc"
31                 
32                 style "user-font"
33                 {
34                 }
35                 widget_class "*" style "user-font"
36                 gtk-theme-name="kde${_kdever}-oxygen-molecule"
37                 gtk-font-name="DejaVu Sans 9"
39                 ################################################################################
40                 #  If you want GTK+ apps run with root privileges to be themed as well, copy
41                 #+ your newly created \`~/.gtkrc-2.0' file to \`/root/gtkrc-2.0'
43                 sudo cp ~/.gtkrc-2.0 /root/.gtkrc-2.0
45                 ################################################################################
46                 #  You may apply the Oxygen-Molecule color scheme to your KDE apps by going to
47                 #+ \`System Settings -> Appearance -> Colors' and selecting the OxygenMolecule.
48                 #
49                 #  Also, to make sure your GTK apps use only the Oxygen Molecule color scheme,
50                 #+ navigate to \`System Settings -> Appearance -> Colors -> Options (tab)' and
51                 #+ uncheck the "Apply colors to non-KDE4 applications" option.
52         EOF
55 post_upgrade() {
56         post_install \$1
59 op=\$1
60 shift
61 \$op \$*
62 EOF
65 function build() {
66         mkdir -p "${pkgdir}/usr/bin"
67         mkdir -p "${pkgdir}/usr/share/themes"
68         mkdir -p "${pkgdir}/usr/share/apps/color-schemes"
71 function package() {
72         tar -xzf kde${_kdever}-oxygen-molecule.tar.gz -C "${pkgdir}/usr/share/themes"
73         cp Oxygen-Molecule_${_colors}.colors "${pkgdir}/usr/share/apps/color-schemes"
74         install -m 755 flatmolecule "${pkgdir}/usr/bin/"
75         
76         # Create the install file
77         create_install
78         export install="${pkgname}.install"