mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-27 12:32:14 +08:00
216 lines
9.3 KiB
Bash
216 lines
9.3 KiB
Bash
#
|
|
# KDE SC Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
# include global config
|
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
|
|
|
# Default wallpaper included in kde-workspace pkg
|
|
_default_wp="Elarun"
|
|
|
|
pkgname="kde-workspace"
|
|
arch=('x86_64')
|
|
pkgver=${_kdever}
|
|
pkgrel=4
|
|
pkgdesc="KDE Workspace"
|
|
url="http://www.kde.org"
|
|
license=('GPL' 'LGPL' 'FDL')
|
|
options=('docs' '!header' 'debug' 'log')
|
|
install=${pkgname}.install
|
|
depends=('polkit-kde-agent' "kdepimlibs>=${_kdever}" "kde-runtime>=${_kdever}" 'qimageblitz' 'mesa' "kactivities>=${_kdever}"
|
|
'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}"
|
|
'xcb-util-keysyms' 'xcb-util-wm')
|
|
makedepends=('pkgconfig' 'cmake' 'automoc4' 'networkmanager' 'bluez' "kdebindings-pykde4>=${_kdever}"
|
|
'oxygen-icons' "kde-runtime>=${_kdever}" 'gpsd' 'samba' 'xf86-input-wacom'
|
|
'libraw1394' 'libdmtx' 'docbook-xsl' 'prison' 'qrencode')
|
|
optdepends=("appmenu-qt: Global menu support"
|
|
"kdebindings-pykde4: Python Support for Plasma"
|
|
"kdeedu-marble: Marble Wallpaper Plugin"
|
|
"gpsd: Plasma geolocation support"
|
|
"kscreen: Multiple monitors made easy"
|
|
"ntp: Time/date sync support"
|
|
"opentp: Optional time/date sync support"
|
|
"xf86-input-wacom: Wacom tablet support")
|
|
provides=('kdebase-workspace' 'powerdevil' 'kcm_tablet=1.1.3' 'kde-workspace-doc' 'ktouchpadenabler')
|
|
replaces=('guidance-power-manager' 'kdebase-workspace' 'kde-workspace-doc' 'ktouchpadenabler')
|
|
conflicts=('kdebase-workspace' 'powerdevil' 'kcm_tablet' 'guidance-power-manager' 'kde-workspace-doc' 'kded-appmenu' 'ktouchpadenabler')
|
|
groups=("kde" "kde-uninstall" "kde-minimal")
|
|
backup=('usr/share/config/kdm/kdmrc'
|
|
'etc/pam.d/kscreensaver')
|
|
|
|
|
|
source=($_mirror/${pkgname}-$_kdever.tar.xz
|
|
$_mirror/kde-wallpapers-$_kdever.tar.xz
|
|
mishaaq-kcm_touchpad-00370b5.tar.gz
|
|
http://chakra.sourceforge.net/sources/kdebase-workspace/114856-wacomtablet-1.99.3.tar.bz2
|
|
http://chakra.sourceforge.net/sources/kdebase-workspace/117639-favorites-0.1.tar.bz2
|
|
kde.pam
|
|
kde-np.pam
|
|
kscreensaver.pam
|
|
chakra-branding.tar.gz
|
|
kdm.service
|
|
|
|
# core patches
|
|
01_kdm_zsh_profile.patch
|
|
#02_sane_env_and_shutdown_path.patch
|
|
03_plasma_menubutton_branding.patch
|
|
04_plasma_kickoff_url.patch
|
|
06_kickoff_default_favourites.patch
|
|
07_always_show_kickoff_subtext.patch
|
|
09_enable_start-shutdown-scripts.patch
|
|
|
|
# restart xserver on logout
|
|
fix_terminate-server.patch
|
|
# "fix" some sytemsettings modules that need root access
|
|
fix_root-only-kcms.patch)
|
|
|
|
|
|
sha1sums=(`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
|
|
'e5cdf487940030c2aec83498d324fd4c7af2ea47'
|
|
'53bb8d20edb1ffd34d1977d06c92d9e8635889c3'
|
|
'47af1613c1e4c724049971a4a7db3db11ca395b1'
|
|
'660eae40a707d2711d8d7f32a93214865506b795'
|
|
'6aeecc9e0e221f0515c6bf544f9a3c11cb6961fe'
|
|
'106635aa1aae51d6f0668b1853f6c49a4fe9d3d8'
|
|
'07dd142fba8bd4b0892036529fcf4cecb329396e'
|
|
'b6f8e8692737b11eec1f8022ce74b5b23e247b1b'
|
|
'8c2bdefb23a03b753b78d16944d03fa3939d2d99'
|
|
'6abf814689cf876e8648abd73faef7327b3f7edf'
|
|
'96ca52d2a5307b55d00efeb4c5bf4c5c604bf5f9'
|
|
'95b9c19e285178dd6309e7962cd35d4b7c12c570'
|
|
'0c53c7ce9bd2d94ee876a5d562d4c303930277be'
|
|
'f7d4564b8877f7f383c0dae174399f537c7b46ad'
|
|
'ac7bc292c865bc1ab8c02e6341aa7aeaf1a3eeee'
|
|
'f9699cb2a2259849d3ff635ef0cd335b0d335eef')
|
|
|
|
build() {
|
|
cd ${srcdir}/${pkgname}-${pkgver}
|
|
|
|
msg "applying main patchset ..."
|
|
patch -Np0 -i ${srcdir}/01_kdm_zsh_profile.patch
|
|
# 02 is merged in 09, Jan 2013
|
|
#patch -Np0 -i ${srcdir}/02_sane_env_and_shutdown_path.patch
|
|
patch -Np1 -i ${srcdir}/03_plasma_menubutton_branding.patch
|
|
patch -Np0 -i ${srcdir}/04_plasma_kickoff_url.patch
|
|
patch -Np1 -i ${srcdir}/06_kickoff_default_favourites.patch
|
|
patch -Np1 -i ${srcdir}/07_always_show_kickoff_subtext.patch
|
|
patch -Np0 -i ${srcdir}/09_enable_start-shutdown-scripts.patch
|
|
|
|
msg "applying fixes ..."
|
|
patch -p0 -i ${srcdir}/fix_terminate-server.patch
|
|
patch -p1 -i ${srcdir}/fix_root-only-kcms.patch
|
|
|
|
# disable krandr
|
|
sed -i "s/add_subdirectory(randr)//g" ./kcontrol/CMakeLists.txt
|
|
|
|
msg "starting workspace build ..."
|
|
cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
|
|
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
|
|
-DWITH_Xmms=OFF \
|
|
-DCMAKE_SKIP_RPATH=ON \
|
|
-DWITH_CkConnector=OFF \
|
|
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
|
|
make
|
|
|
|
msg "starting kcm_touchpad build ..."
|
|
cd ${srcdir}/mishaaq-kcm_touchpad-00370b5
|
|
# Fix desktop to the new layout
|
|
sed -i -e "s~keyboard-and-mouse~input-devices~g" touchpad.desktop
|
|
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}/wacomtablet-1.99.3
|
|
# Fix desktop to the new layout
|
|
sed -i -e "s~keyboard-and-mouse~input-devices~g" ${srcdir}/wacomtablet-1.99.3/src/kcmodule/kcm_wacomtablet.desktop
|
|
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'
|
|
|
|
make
|
|
}
|
|
|
|
|
|
package() {
|
|
cd ${srcdir}/${pkgname}-${pkgver}
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
cd ${srcdir}/mishaaq-kcm_touchpad-00370b5
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
cd ${srcdir}/wacomtablet-1.99.3
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
cd ${srcdir}/favorites-0.1
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
# 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
|
|
install -D -m 644 ${srcdir}/${pkgname}-${pkgver}/kdm/kfrontend/sessions/kde-plasma.desktop \
|
|
${pkgdir}/etc/X11/sessions/kde-plasma.desktop
|
|
install -D -m 644 ${srcdir}/${pkgname}-${pkgver}/kdm/kfrontend/sessions/kde-plasma-safe.desktop \
|
|
${pkgdir}/etc/X11/sessions/kde-plasma-safe.desktop
|
|
|
|
# also install kdm clean default config
|
|
cd ${srcdir}/${pkgname}-${pkgver}/kdm
|
|
make DESTDIR=${pkgdir} GENKDMCONF_FLAGS="--no-old --no-backup --no-in-notice" install
|
|
|
|
# copy branding stuff
|
|
mkdir -p ${pkgdir}/usr/share/icons/oxygen/scalable/places/
|
|
|
|
cp -f ${srcdir}/chakra-branding/start-here-branding.svgz ${pkgdir}/usr/share/icons/oxygen/scalable/places/start-here-branding.svgz
|
|
cp -f ${srcdir}/chakra-branding/kdemod-start-here-branding.svgz ${pkgdir}/usr/share/icons/oxygen/scalable/places/kdemod-start-here-branding.svgz
|
|
|
|
cp -f ${srcdir}/chakra-branding/branding-icon.png ${pkgdir}/usr/share/apps/kdm/themes/oxygen/branding-icon.png
|
|
|
|
cd ${srcdir}/chakra-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
|
|
install -D -m644 kdemod-start-here-branding-${i}.png ${pkgdir}/usr/share/icons/oxygen/${i}x${i}/places/kdemod-start-here-branding.png
|
|
done
|
|
|
|
# edit kdmrc
|
|
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
|
|
sed -i -e s,Theme=/usr.*,Theme=/usr/share/apps/kdm/themes/horos,g ${pkgdir}/usr/share/config/kdm/kdmrc
|
|
sed -i -e s,MinShowUID=.*,MinShowUID=1000,g ${pkgdir}/usr/share/config/kdm/kdmrc
|
|
sed -i -e 's/halt/poweroff/' ${pkgdir}/usr/share/config/kdm/kdmrc
|
|
|
|
# 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
|
|
|
|
# Put a wallpaper into the package
|
|
mkdir -p ${pkgdir}/usr/share/wallpapers
|
|
cp -rv ${srcdir}/kde-wallpapers-${_kdever}/${_default_wp} ${pkgdir}/usr/share/wallpapers
|
|
|
|
# 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
|
|
|
|
# Systemd .service file
|
|
install -D -m644 "${srcdir}"/kdm.service "${pkgdir}"/usr/lib/systemd/system/kdm.service
|
|
}
|