summaryrefslogtreecommitdiff
path: root/community/cinnamon/PKGBUILD
blob: 1ed94ac4f221a744e003d191eb05ee03508c8198 (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
# $Id: PKGBUILD 109424 2014-04-14 20:15:29Z jgc $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: M0Rf30
# Contributor: unifiedlinux
# Contributor: CReimer

pkgname=cinnamon
pkgver=2.2.1
pkgrel=1
pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience"
arch=('i686' 'x86_64')
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' 'python2-dbus' 'python2-pillow'
         'python2-pam' 'python2-pexpect' 'python2-pyinotify' 'python2-lxml' 'webkitgtk'
         'cinnamon-control-center' 'cinnamon-screensaver' 'cinnamon-menus' '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"
        "upower_calender_fix.patch"
        "keyboard_applet.patch"
        "input_keybindings.patch"
        "set_wheel.patch"
        "org.archlinux.pkexec.cinnamon-settings-users.policy")
sha256sums=('34ad53f81cf57e8dca06fbd76b0be761b16d9f46a1b5aa22596cd07725703478'
            'babfe88a3773f5369b05c7b61d0318cf969b482b9e0c3f281afaf488b0051e53'
            '6acb07393105ddced8a4c3c869a596350d1a7d81a808ca5307d2ad770653a9d3'
            'e28c40eb844105154fa6106f5b4de3151a22805b3a7b2f84be9ea6c15cec3de6'
            'd5d5634b24e56837cb677e62669450c25f79005ed1388584760a131f461180ec'
            '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 calendar applet with upower 0.99
  patch -Np1 -i ../upower_calender_fix.patch

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

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

  # Use wheel group instread of sudo
  patch -Np1 -i ../set_wheel.patch

  # Fix required components
  sed -i 's/cinnamon-fallback-mount-helper;/polkit-gnome-authentication-agent-1;/' 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 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"
}