PKGBUILD 8.78 KB
Newer Older
Phil Miller's avatar
Phil Miller committed
1 2 3
#
# KDE SC Packages for Chakra, part of chakra-project.org
#
Anke's avatar
Anke committed
4 5
# maintainer abveritas@chakra-project.org
# maintainer Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
Phil Miller's avatar
Phil Miller committed
6 7 8 9

# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf

philm's avatar
philm committed
10 11 12 13
# Default wallpaper included in kde-workspace pkg
_default_wp="Ariya"

pkgname="kde-workspace"
14
arch=('x86_64')
Phil Miller's avatar
Phil Miller committed
15
pkgver=${_kdever}
16
pkgrel=1
philm's avatar
philm committed
17
pkgdesc="KDE Workspace"
Phil Miller's avatar
Phil Miller committed
18 19
url="http://www.kde.org"
license=('GPL' 'LGPL' 'FDL')
20
options=('docs' '!splithdr' 'splitdbg' 'log')
philm's avatar
philm committed
21
install=${pkgname}.install
22
depends=('polkit-kde-agent' "kdepimlibs>=${_kdever}" "kde-runtime>=${_kdever}" 'qimageblitz' 'mesa' "kactivities>=${_kdever}"
23 24
	 'libxxf86misc' 'libxcomposite' 'xcb-util-image' 'xcb-util-renderutil' 'libxss' 'lm_sensors' 'libxklavier' 'libxft' 'oxygen-icons' 'xkit' 'libxdamage' 
         'xorg-utils' 'libxrandr' 'libxres' 'libdmtx' 'libqalculate' 'prison' 'qrencode' "kdepim-runtime>=${_kdever}" "kde-base-artwork>=${_kdever}")
Phil's avatar
Phil committed
25
makedepends=('pkgconfig' 'cmake' 'automoc4' 'networkmanager' 'bluez' "kdebindings-pykde4>=${_kdever}"
Manuel's avatar
Manuel committed
26
	    'oxygen-icons' 'qedje' "kde-runtime>=${_kdever}" 'gpsd' 'samba' 
27
	    'libraw1394' 'libdmtx' 'docbook-xsl' 'prison' 'qrencode') #google-gadgets-qt 
philm's avatar
philm committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41
optdepends=("kdebindings-pykde4: Python Support for Plasma"
	    "kdeedu-marble:      Marble Wallpaper Plugin"
	    "qedje:              Plasma Support for Edje Files"
	    "gpsd:               Plasma geolocation support"
	    "ntp:                Time/date sync support"
	    "opentp:             Optional time/date sync support")
provides=('kdebase-workspace' 'powerdevil' 'kcm_tablet=1.1.3' 'kde-workspace-doc')
replaces=('guidance-power-manager' 'kdebase-workspace' 'kde-workspace-doc')
conflicts=('kdebase-workspace' 'powerdevil' 'kcm_tablet' 'guidance-power-manager' 'kde-workspace-doc')
groups=("kde" "kde-uninstall" "kde-minimal")
backup=('usr/share/config/kdm/kdmrc'
        'etc/pam.d/kscreensaver')


42
source=($_mirror/${pkgname}-$_kdever.tar.xz
Anke's avatar
Anke committed
43
	$_mirror/kde-wallpapers-$_kdever.tar.xz
Phil Miller's avatar
Phil Miller committed
44
	mishaaq-kcm_touchpad-00370b5.tar.gz
45 46
        http://chakra.sourceforge.net/sources/kde-workspace/114856-kcm_tablet-1.1.3.tar.gz
        http://chakra.sourceforge.net/sources/kde-workspace/117639-favorites-0.1.tar.bz2
Phil Miller's avatar
Phil Miller committed
47 48 49 50 51
        kde.pam
        kde-np.pam
        kscreensaver.pam
        chakra-branding.tar.gz
	chakra-themes.tar.gz
52
	kdm.service
Phil Miller's avatar
Phil Miller committed
53 54 55 56 57 58 59 60 61 62

        # core patches
        01_kdm_zsh_profile.patch
        03_plasma_menubutton_branding.patch
	06_kickoff_default_favourites.patch
	07_always_show_kickoff_subtext.patch

	# restart xserver on logout
	fix_terminate-server.patch
	# "fix" some sytemsettings modules that need root access
63
	fix_root-only-kcms.patch
64
	appmenu.diff)
Phil Miller's avatar
Phil Miller committed
65

Anke's avatar
Anke committed
66 67
md5sums=(`grep ${pkgname}-$_kdever.tar.xz ../kde-sc.md5 | cut -d" " -f1`
        `grep kde-wallpapers-$_kdever.tar.xz ../kde-sc.md5 | cut -d" " -f1` # kde-wallpapers
philm's avatar
philm committed
68 69 70 71
        'f355a658d2e9267fdf4e8d8f88038bcf'  # mishaaq-kcm_touchpad-00370b5.tar.gz
        'd4570491bcf9986d84aeb77c939090a9'  # 114856-kcm_tablet-1.1.3.tar.gz
        'b60baabccbd302d00923e053db0dc0ae'  # 117639-favorites-0.1.tar.bz2

72
        '5b137f8b00c578ec324e72b455814fd0'  #  kde.pam
73
        'ce53d3a059f5ccbf7429058f935ee9a4'  #  kde-np.pam
philm's avatar
philm committed
74 75 76
        '367a3538f54db71f108b34cfa31088ac'  #  kscreensaver.pam
        '169c6fc83d5562b5d7249db7fc46d8d6'  #  chakra-branding.tar.gz
        'c328f1c5cfa3e551205ffdc0fdda41a8'  #  chakra-themes.tar.gz
77
        'c4b5f1b342b3dad38642318ca077daee'  #  kdm.service
philm's avatar
philm committed
78 79 80 81 82 83 84

        '721e97031b62aee8914e8617e86f9235'  #  01_kdm_zsh_profile.patch
        '8e623bb5608025417ff9ed061e5a03f1'  #  03_plasma_menubutton_branding.patch
        'd4d7d3fc3ac072a8ca848e9c96e517dc'  #  06_kickoff_default_favourites.patch
        '89d96455c6a446ef59b0620d1b8606af'  #  07_always_show_kickoff_subtext.patch

        '814350c52c135d6f7bdada1e29223d38'  #  fix_terminate-server.patch
85
	'5f963f80a026f0600edae1b1c70411e5'  #  fix_root-only-kcms.patch
86
        'ca3877bf428d13eead45756fa94376b5') #  appmenu.diff
philm's avatar
philm committed
87

philm's avatar
philm committed
88 89
build() {
	cd ${srcdir}/${pkgname}-${pkgver}
Phil Miller's avatar
Phil Miller committed
90 91

	msg "applying main patchset ..."
Phil's avatar
Phil committed
92 93 94 95
	patch -Np0 -i ${srcdir}/01_kdm_zsh_profile.patch
	patch -Np1 -i ${srcdir}/03_plasma_menubutton_branding.patch
	patch -Np1 -i ${srcdir}/06_kickoff_default_favourites.patch
	patch -Np1 -i ${srcdir}/07_always_show_kickoff_subtext.patch
Phil Miller's avatar
Phil Miller committed
96 97

	msg "applying fixes ..."
98 99
	patch -p0 -i ${srcdir}/fix_terminate-server.patch
        patch -p1 -i ${srcdir}/fix_root-only-kcms.patch
100
        #patch -p1 -i ${srcdir}/appmenu.diff
Phil Miller's avatar
Phil Miller committed
101 102 103 104 105 106 107

	msg "starting workspace build ..."
	cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
		-DCMAKE_INSTALL_PREFIX=${_installprefix} \
		-DWITH_Xmms=OFF \
		-DCMAKE_SKIP_RPATH=ON \
		-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
Phil's avatar
Phil committed
108
	make
Phil Miller's avatar
Phil Miller committed
109

philm's avatar
philm committed
110
        msg "starting kcm_touchpad build ..."
Phil Miller's avatar
Phil Miller committed
111
	cd ${srcdir}/mishaaq-kcm_touchpad-00370b5
Manuel's avatar
Manuel committed
112 113
        # Fix desktop to the new layout
	sed -i -e "s~keyboard-and-mouse~input-devices~g" touchpad.desktop
Phil Miller's avatar
Phil Miller committed
114 115 116 117 118 119
	cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
		-DCMAKE_INSTALL_PREFIX=${_installprefix} \
		-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'

	msg "starting kcm_tablet build ..."
	cd ${srcdir}/kcm_tablet-1.1.3
Manuel's avatar
Manuel committed
120 121
        # Fix desktop to the new layout
        sed -i -e "s~keyboard-and-mouse~input-devices~g" ${srcdir}/kcm_tablet-1.1.3/src/kcm_tablet.desktop
Phil Miller's avatar
Phil Miller committed
122 123 124 125 126 127 128 129 130 131
	cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
		-DCMAKE_INSTALL_PREFIX=${_installprefix} \
		-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'

	msg "starting favorites launcher build ..."
	cd ${srcdir}/favorites-0.1
	cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
		-DCMAKE_INSTALL_PREFIX=${_installprefix} \
		-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'

Phil's avatar
Phil committed
132
	make
Phil Miller's avatar
Phil Miller committed
133 134 135
}


philm's avatar
philm committed
136 137
package() {
	cd ${srcdir}/${pkgname}-${pkgver}
Phil's avatar
Phil committed
138
	make DESTDIR=${pkgdir} install
Phil Miller's avatar
Phil Miller committed
139 140

	cd ${srcdir}/mishaaq-kcm_touchpad-00370b5
Phil's avatar
Phil committed
141
	make DESTDIR=${pkgdir} install
Phil Miller's avatar
Phil Miller committed
142 143

	cd ${srcdir}/kcm_tablet-1.1.3
Phil's avatar
Phil committed
144
	make DESTDIR=${pkgdir} install
Phil Miller's avatar
Phil Miller committed
145 146

	cd ${srcdir}/favorites-0.1
Phil's avatar
Phil committed
147
	make DESTDIR=${pkgdir} install
Phil Miller's avatar
Phil Miller committed
148 149 150 151 152 153 154 155 156 157

	# install pam configuration
	install -D -m644 ${srcdir}/kde.pam ${pkgdir}/etc/pam.d/kde
	install -D -m644 ${srcdir}/kde-np.pam ${pkgdir}/etc/pam.d/kde-np
	install -D -m644 ${srcdir}/kscreensaver.pam ${pkgdir}/etc/pam.d/kscreensaver

	# sane path for env and shutdown dir
	install -d -m755 ${pkgdir}/etc/kde/{env,shutdown}

	# install session
philm's avatar
philm committed
158
	install -D -m 644 ${srcdir}/${pkgname}-${pkgver}/kdm/kfrontend/sessions/kde-plasma.desktop \
philm's avatar
philm committed
159
	${pkgdir}/etc/X11/sessions/kde-plasma.desktop
philm's avatar
philm committed
160
	install -D -m 644 ${srcdir}/${pkgname}-${pkgver}/kdm/kfrontend/sessions/kde-plasma-safe.desktop \
philm's avatar
philm committed
161
	${pkgdir}/etc/X11/sessions/kde-plasma-safe.desktop
Phil Miller's avatar
Phil Miller committed
162 163

	# also install kdm clean default config
philm's avatar
philm committed
164
	cd ${srcdir}/${pkgname}-${pkgver}/kdm 
Phil Miller's avatar
Phil Miller committed
165 166
	make DESTDIR=${pkgdir} GENKDMCONF_FLAGS="--no-old --no-backup --no-in-notice" install

philm's avatar
philm committed
167
	# TODO: This should be recreated to remove the KDEmod tag and probably remove some outdated stuff
Phil Miller's avatar
Phil Miller committed
168 169 170
	# copy branding stuff
	mkdir -p ${pkgdir}/usr/share/icons/oxygen/scalable/places/
	cp -f ${srcdir}/kdemod-branding/start-here-branding.svgz ${pkgdir}/usr/share/icons/oxygen/scalable/places/start-here-branding.svgz
amnon's avatar
amnon committed
171
	cp -f ${srcdir}/kdemod-branding/branding-icon.png ${pkgdir}/usr/share/apps/kdm/themes/oxygen/branding-icon.png
Phil Miller's avatar
Phil Miller committed
172 173 174 175 176 177
	cd ${srcdir}/kdemod-branding/
	for i in 256 128 64 48 32 22 16; do
		mkdir -p ${pkgdir}/usr/share/icons/oxygen/${i}x${i}/places/
		install -D -m644 start-here-branding-${i}.png ${pkgdir}/usr/share/icons/oxygen/${i}x${i}/places/start-here-branding.png
	done
	
178
	# edit kdmrc
Phil Miller's avatar
Phil Miller committed
179 180
	sed -i -e s,#GUIStyle=.*,GUIStyle=Oxygen,g ${pkgdir}/usr/share/config/kdm/kdmrc
	sed -i -e s,#ColorScheme=.*,ColorScheme=Oxygen,g ${pkgdir}/usr/share/config/kdm/kdmrc
181
	sed -i -e s,Theme=/usr.*,Theme=/usr/share/apps/kdm/themes/horos,g ${pkgdir}/usr/share/config/kdm/kdmrc
Phil Miller's avatar
Phil Miller committed
182
	sed -i -e s,MinShowUID=.*,MinShowUID=1000,g ${pkgdir}/usr/share/config/kdm/kdmrc
183
	sed -i -e 's/halt/poweroff/' ${pkgdir}/usr/share/config/kdm/kdmrc
Phil Miller's avatar
Phil Miller committed
184 185 186 187 188 189 190

	# WORKAROUND -> put ggl stuff into ggl package
	rm -rf ${pkgdir}/usr/share/apps/plasma/plasmoids/ggl_photos
	rm -rf ${pkgdir}/usr/share/apps/plasma/plasmoids/ggl_rss
	rm -rf ${pkgdir}/usr/share/kde4/services/plasma-applet-ggl-photos.desktop
	rm -rf ${pkgdir}/usr/share/kde4/services/plasma-applet-ggl-rss.desktop

Phil's avatar
Phil committed
191
	# Put a wallpaper into the package
Phil Miller's avatar
Phil Miller committed
192
	mkdir -p ${pkgdir}/usr/share/wallpapers
Phil's avatar
Phil committed
193
	cp -rv ${srcdir}/kde-wallpapers-${_kdever}/${_default_wp} ${pkgdir}/usr/share/wallpapers
Phil Miller's avatar
Phil Miller committed
194

195 196 197 198 199
	# Adding powerdevil option files
	mkdir -p ${pkgdir}/usr/include/powerdevil
	cp -rv ${srcdir}/${pkgname}-${_kdever}/powerdevil/daemon/powerdevilaction.h ${pkgdir}/usr/include/powerdevil
	cp -rv ${srcdir}/${pkgname}-${_kdever}/powerdevil/daemon/powerdevilactionconfig.h ${pkgdir}/usr/include/powerdevil
	cp -rv ${srcdir}/${pkgname}-${_kdever}/powerdevil/daemon/powerdevilpolicyagent.h ${pkgdir}/usr/include/powerdevil
200 201 202
	
	# Systemd .service file
	install -D -m644 "${srcdir}"/kdm.service "${pkgdir}"/usr/lib/systemd/system/kdm.service
Phil Miller's avatar
Phil Miller committed
203
}