summaryrefslogtreecommitdiff
path: root/community/cinnamon/PKGBUILD
blob: f03a6bd3fa9e5d2c55c7e5f54c3136ce049d34a1 (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
# $Id: PKGBUILD 100528 2013-11-05 14:09:17Z faidoc $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: M0Rf30
# Contributor: unifiedlinux
# Contributor: CReimer

pkgname=cinnamon
pkgver=2.0.10
pkgrel=1
pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience"
arch=('i686' 'x86_64' 'mips64el')
url="http://cinnamon.linuxmint.com/"
license=('GPL2')
depends=('accountsservice' 'caribou' 'cinnamon-settings-daemon' 'cinnamon-session'
         'cinnamon-translations' 'cjs' 'clutter-gtk' 'gconf' 'gnome-icon-theme'
         'gnome-menus' 'gnome-themes-standard' 'gstreamer' 'libgnome-keyring'
         'librsvg' 'networkmanager' 'muffin' 'pygtk' 'python2-dbus' 'python2-pillow'
         'python2-pam' 'python2-pexpect' 'python2-pyinotify' 'python2-lxml' 'webkitgtk'
         'cinnamon-control-center' 'cinnamon-screensaver' 'libgnomekbd'
         'network-manager-applet' 'nemo' 'polkit-gnome')
makedepends=('gnome-common' 'intltool')
options=('!emptydirs')
install=${pkgname}.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/archive/$pkgver.tar.gz"
        "cinnamon-gstreamer1.patch"
        "keyboard_applet.patch"
        "input_keybindings.patch"
        "org.archlinux.pkexec.cinnamon-settings-users.policy")
sha256sums=('d63c1681da7fa16a0385c64dd93af71ae4ad17fb2a0b112ddfa1aa5232a27596'
            '2e10ba71fd9ba40afd7e9492b2fc0d5bcc27874bcde543cfd8a47ad20c52354a'
            '6acb07393105ddced8a4c3c869a596350d1a7d81a808ca5307d2ad770653a9d3'
            'e28c40eb844105154fa6106f5b4de3151a22805b3a7b2f84be9ea6c15cec3de6'
            '371beac9e55d36f7629d2fc5cb40d6a3e6c0f4aac014f6fefdcd6743b5194b23')

prepare() {
  cd ${srcdir}/Cinnamon*

  # Python2 fix
  sed -i 's:/usr/bin/python :/usr/bin/python2 :' files/usr/bin/cinnamon-menu-editor
  find -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'

  # Fix keyboard applet
  patch -Np1 -i ../keyboard_applet.patch

  # Add input keybindings
  patch -Np1 -i ../input_keybindings.patch

  # Port to GStreamer 1.0. Also backports some recorder bugfixes
  patch -Np1 -i ../cinnamon-gstreamer1.patch

  # Fix required components
  sed -i 's/cinnamon-fallback-mount-helper;/polkit-gnome-authentication-agent-1;/
          s/nm-applet;/cinnamon-nm-applet;/' files/usr/share/cinnamon-session/sessions/cinnamon*.session

  # fix for the python2 PAM module  
  sed -i 's:import PAM:import pam:' files/usr/lib/cinnamon-settings/modules/cs_user.py

  # Use pkexec instead of gksu
  sed -i 's/gksu/pkexec/' files/usr/bin/cinnamon-settings-users

  # Check for the cc-panel path, not for the unneeded binary
  sed -i 's|/usr/bin/cinnamon-control-center|/usr/lib/cinnamon-control-center-1/panels|' files/usr/bin/cinnamon-settings

  # Cinnamon has no upstream backgrounds, use GNOME backgrounds instead
  sed -i 's|/usr/share/cinnamon-background-properties|/usr/share/gnome-background-properties|' \
    files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py

  # Prefix 'System Settings' with 'Cinnamon' to avoid confusion with gnome-control-center
  sed -i 's/^Name\(.*\)=\(.*\)/Name\1=Cinnamon \2/' files/usr/share/applications/cinnamon-settings{,-users}.desktop
}

build() {
  cd ${srcdir}/Cinnamon*

  ./autogen.sh --prefix=/usr \
               --sysconfdir=/etc \
               --libexecdir=/usr/lib/cinnamon \
               --localstatedir=/var \
               --disable-static \
               --disable-schemas-compile \
               --enable-compile-warnings=yes \
               --with-session-tracking=systemd
  make
}

package() {
  cd ${srcdir}/Cinnamon*
  make DESTDIR="${pkgdir}" install

  # Install cinnamon-nm-applet.desktop file
  sed 's/^NotShowIn=.*/OnlyShowIn=GNOME/' /usr/share/applications/nm-applet.desktop \
    > "${pkgdir}/usr/share/applications/cinnamon-nm-applet.desktop"

  # Install policy file
  install -Dm644 "${srcdir}/org.archlinux.pkexec.cinnamon-settings-users.policy" \
                 "${pkgdir}/usr/share/polkit-1/actions/org.archlinux.pkexec.cinnamon-settings-users.policy"
}