summaryrefslogtreecommitdiff
path: root/community/cinnamon/PKGBUILD
blob: c6edd80184210bf67a16698a1f5b74858a4b6d53 (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
# $Id: PKGBUILD 113158 2014-06-14 16:06:43Z faidoc $
# Maintainer: Alexandre Filgueira <alexfilgueira@cinnarch.com>
# Contributor: M0Rf30
# Contributor: unifiedlinux
# Contributor: CReimer

pkgname=cinnamon
pkgver=2.2.13
pkgrel=2
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-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"
        "set_wheel.patch"
        "upower_power_applet_fix.patch")
sha256sums=('123261a6a90954adc13f251489d708bc1b611808c63ae87c5189bf717f42483a'
            '2edb96f42fb4da07eee635b1159e3ae869c64d7ac80f600bc509190648abcf3e'
            'dafb2b7b275053aa77d15f2ffab62ad1567aa9d93ed7a82077feeef86b81c7f7'
            'da6594cd05f5f9c242cdc179e5af1bd5afb79506e77ac457d2a7e8930692c45c')

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 power applet to work with upower 0.99
  patch -Np1 -i ../upower_power_applet_fix.patch

  # Fix calendar applet with upower 0.99
  patch -Np1 -i ../upower_calender_fix.patch

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

  # Add polkit agent to required components
  sed -i 's/RequiredComponents=\(.*\)$/RequiredComponents=\1polkit-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
}

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
}