mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
337 lines
13 KiB
Bash
337 lines
13 KiB
Bash
# Include global configuration
|
|
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
|
|
|
_default_wp="Elarun"
|
|
pkgbase="kde-workspace"
|
|
pkgname=("kde-workspace" "kde4-integration" "libksysguard4" "libkworkspace4")
|
|
arch=('x86_64')
|
|
pkgver=${_workspace_ver}
|
|
pkgrel=4
|
|
url="http://www.kde.org"
|
|
license=('GPL' 'LGPL' 'FDL')
|
|
makedepends=('pkgconfig'
|
|
'cmake'
|
|
'automoc4'
|
|
'networkmanager'
|
|
'bluez'
|
|
"kdebindings-python2>=${_oldkdever}"
|
|
'oxygen-icons'
|
|
"kde-runtime"
|
|
'gpsd'
|
|
'samba'
|
|
'xf86-input-wacom'
|
|
'libraw1394'
|
|
'libdmtx'
|
|
'docbook-xsl'
|
|
'prison'
|
|
'qrencode'
|
|
"kdepimlibs>=${_libsver}"
|
|
'qimageblitz'
|
|
'mesa'
|
|
"libkactivities4"
|
|
'libxcomposite'
|
|
'xcb-util-image'
|
|
'xcb-util-renderutil'
|
|
'libxss'
|
|
'lm_sensors'
|
|
'libxklavier'
|
|
'libxft'
|
|
'xkit'
|
|
'libxdamage'
|
|
'xorg-utils'
|
|
'libxrandr'
|
|
'libxres'
|
|
'libdmtx'
|
|
'libqalculate'
|
|
'prison'
|
|
'qrencode'
|
|
"kdepim-runtime>=${_libsver}"
|
|
"kde-base-artwork>=${_kdever}"
|
|
'xcb-util-keysyms'
|
|
'xcb-util-wm')
|
|
options=('docs'
|
|
'!header'
|
|
'debug'
|
|
'log')
|
|
groups=('kde'
|
|
'kde-uninstall'
|
|
'kde-minimal')
|
|
source=("http://download.kde.org/stable/applications/${_kdever}/src/kde-workspace-${_workspace_ver}.tar.xz"
|
|
"http://download.kde.org/stable/applications/${_kdever}/src/kde-wallpapers-${_kdever}.tar.xz"
|
|
"git://anongit.kde.org/wacomtablet#tag=v2.0.2"
|
|
'kde.pam'
|
|
'kde-np.pam'
|
|
'kscreensaver.pam'
|
|
'chakra-branding.tar.gz'
|
|
'kdm.service'
|
|
'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'
|
|
'fix_terminate-server.patch'
|
|
'fix_root-only-kcms.patch'
|
|
'plasma-panel-resize-hint.diff')
|
|
|
|
|
|
sha256sums=(`grep ${pkgname}-$pkgver.tar.xz ../checksums.txt | cut -d " " -f1`
|
|
`grep kde-wallpapers-$_kdever.tar.xz ../checksums.txt | cut -d " " -f1`
|
|
'SKIP'
|
|
'812111f166fdf9ab7ef9400c4414cbe26fac5210f2292399d4446fe6e89eea54'
|
|
'3ca72a5f34d29747d12b9b41888d0e369956ba383478850c578e3aa109444214'
|
|
'0a985e3b699578de3e22b25ee72abe4e24ca8730e4afb37dfeed367823bdb0d5'
|
|
'e5f970c550ce5d1397ae05692162d4c70d193ecac54369ec92a4fad1646c6394'
|
|
'b932b7761651df48746b7e5e178fd4c7d322e9f6c41dcf2ec2c51f91a6440d85'
|
|
'b33bb32aaef3c25bd3bda458ec569c500a8e636481e2010de4c82488f1634581'
|
|
'a4c05882dd3a340960dec495cb2fd19cf2523d14a7add5b77af0f98cdff4c394'
|
|
'9b3e7905a8382e46b72830fd6adf311200c5c30cadcfd71b1f0adf34cad251eb'
|
|
'3c7fa690825d870fd7e15534e597d71a11f251baa7b233487d4f161813b17f39'
|
|
'26b5495def4edc9317af23b9f4720c442e3e61d6937b3b168f0aa681b63681a2'
|
|
'57e52bbe7fd9553fd6ed969edef4cc709aa8109f9d5ef44203da6e8d7ede46b4'
|
|
'ad91b3661bcb72bbbd12ed100fc76b7ae0829e37e726adb9c3e4e4cb44d496fd'
|
|
'e5329c87f14ce04f80291f1f7a2be47994f3d54425b572c308b38e2718390959'
|
|
'b38959520a3ecafe6f5628849e29d7e8b0dc030622fa12e77eb8461ad7187a78'
|
|
'6bc640b8324d47e9d07a7cedef7e7c5a944ec4d900a15b88471dc77724f9b4a7')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
msg "Applying patches..."
|
|
patch -Np0 -i ${srcdir}/01_kdm_zsh_profile.patch
|
|
# 02 was merged in upstream 2013-01-09
|
|
#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
|
|
patch -p0 -i ${srcdir}/fix_terminate-server.patch
|
|
patch -p1 -i ${srcdir}/fix_root-only-kcms.patch
|
|
patch -p0 -i ${srcdir}/plasma-panel-resize-hint.diff
|
|
|
|
# Disable krandr
|
|
sed -i "s/add_subdirectory(randr)//g" ./kcontrol/CMakeLists.txt
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
msg "Building workspace..."
|
|
CXXFLAGS="${CXXFLAGS} -I /usr/include/freetype2" 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 "Building kcm_tablet..."
|
|
cd "${srcdir}/wacomtablet"
|
|
# Fix desktop to the new layout
|
|
sed -i -e "s~keyboard-and-mouse~input-devices~g" src/kcmodule/kcm_wacomtablet.desktop
|
|
CXXFLAGS="${CXXFLAGS} -I /usr/include/freetype2" cmake . \
|
|
-DCMAKE_BUILD_TYPE=${_build_type} \
|
|
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
|
|
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
|
|
make
|
|
}
|
|
|
|
package_kde-workspace() {
|
|
pkgdesc="KDE Workspace"
|
|
install=${pkgname}.install
|
|
depends=('polkit-kde-agent'
|
|
"kdepimlibs>=${_libsver}"
|
|
"kde-runtime"
|
|
'qimageblitz'
|
|
'mesa'
|
|
"kactivities"
|
|
'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>=${_libsver}"
|
|
"kde-base-artwork>=${_kdever}"
|
|
'xcb-util-keysyms'
|
|
'xcb-util-wm'
|
|
'kde4-integration'
|
|
'libksysguard4'
|
|
'libkworkspace4')
|
|
backup=('usr/share/config/kdm/kdmrc'
|
|
'etc/pam.d/kscreensaver')
|
|
optdepends=('appmenu-qt: Global menu support'
|
|
'kdebindings-python2: Python 2 support for Plasma'
|
|
'kdebindings-python3: Python 3 support for Plasma'
|
|
'kdeedu-marble: Marble wallpaper Plugin'
|
|
'gpsd: Plasma geolocation support'
|
|
'kscreen: Monitor configuration'
|
|
'ntp: Time/date sync support'
|
|
'opentp: Optional time/date sync support'
|
|
'xf86-input-wacom: Wacom tablet support')
|
|
provides=('kdebase-workspace'
|
|
'kcm_tablet=2.0.2'
|
|
'kde-workspace-doc')
|
|
replaces=('guidance-power-manager'
|
|
'kdebase-workspace'
|
|
'kde-workspace-doc')
|
|
conflicts=('kdebase-workspace'
|
|
'kcm_tablet'
|
|
'guidance-power-manager'
|
|
'kde-workspace-doc'
|
|
'kded-appmenu')
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
cd "${srcdir}/wacomtablet"
|
|
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 directories
|
|
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
|
|
|
|
# Install KDM clean default configuration
|
|
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 in 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
|
|
cp -rv ${srcdir}/${pkgname}-${pkgver}/powerdevil/daemon/powerdevilaction.h ${pkgdir}/usr/include/powerdevil
|
|
cp -rv ${srcdir}/${pkgname}-${pkgver}/powerdevil/daemon/powerdevilactionconfig.h ${pkgdir}/usr/include/powerdevil
|
|
cp -rv ${srcdir}/${pkgname}-${pkgver}/powerdevil/daemon/powerdevilpolicyagent.h ${pkgdir}/usr/include/powerdevil
|
|
|
|
# Systemd .service file
|
|
install -D -m644 "${srcdir}"/kdm.service "${pkgdir}"/usr/lib/systemd/system/kdm.service
|
|
|
|
# Remove krandr files
|
|
rm -rf ${pkgdir}/usr/lib/debug/usr/bin/krandrtray.debug
|
|
rm -rf ${pkgdir}/usr/bin/krandrtray
|
|
rm -rf ${pkgdir}/usr/bin/krandrstartup
|
|
rm -rf ${pkgdir}/usr/lib/kde4/kded_randrmonitor.so
|
|
rm -rf ${pkgdir}/usr/lib/kde4/kcm_randr.so
|
|
rm -rf ${pkgdir}/usr/share/applications/kde4/krandrtray.desktop
|
|
rm -rf ${pkgdir}/usr/share/kde4/services/randr.desktop
|
|
rm -rf ${pkgdir}/usr/share/kde4/services/kded/randrmonitor.desktop
|
|
# remove krandr from startkde
|
|
sed -i 's/. krandrstartup//g' ${pkgdir}/usr/bin/startkde
|
|
|
|
# resolve kdm issue (missing directory)
|
|
mkdir -p ${pkgdir}/var/lib/kdm
|
|
chown 135:135 ${pkgdir}/var/lib/kdm
|
|
|
|
# remove file in kde4-integration
|
|
rm -rf ${pkgdir}/usr/lib/kde4/plugins/gui_platform/
|
|
|
|
# remove ksysguard files
|
|
rm -rf ${pkgdir}/usr/share/apps/ksysguard \
|
|
${pkgdir}/usr/lib/liblsofui.so.* \
|
|
${pkgdir}/usr/lib/libprocessui.so.* \
|
|
${pkgdir}/usr/lib/libksignalplotter.so.* \
|
|
${pkgdir}/usr/lib/libprocesscore.so.* \
|
|
${pkgdir}/usr/lib/libksgrd.so.* \
|
|
${pkgdir}/usr/lib/kde4/plugins/designer/ksysguardlsofwidgets.so \
|
|
${pkgdir}/usr/lib/kde4/plugins/designer/ksysguardwidgets.so \
|
|
${pkgdir}/usr/lib/kde4/plugins/designer/ksignalplotterwidgets.so
|
|
|
|
# remove libkworkspace files
|
|
rm -rf ${pkgdir}/usr/include/kworkspace \
|
|
${pkgdir}/usr/lib/libkworkspace.so*
|
|
}
|
|
|
|
package_kde4-integration()
|
|
{
|
|
pkgdesc=("Qt4/KDE4 integration")
|
|
depends=("kdelibs")
|
|
|
|
cd "${srcdir}/${pkgbase}-${pkgver}/qguiplatformplugin_kde/"
|
|
make DESTDIR=${pkgdir} install
|
|
}
|
|
|
|
package_libksysguard4()
|
|
{
|
|
pkgdesc=("KDE4 version of libksysguard")
|
|
depends=("kdelibs")
|
|
|
|
cd "${pkgbase}-${pkgver}/libs/ksysguard"
|
|
make DESTDIR=${pkgdir} install
|
|
# remove the process helper
|
|
rm -rf "${pkgdir}"{/usr/share/dbus-1/,/usr/share/polkit-1,/etc,/usr/lib/kde4/libexec}
|
|
# remove header
|
|
rm -rf ${pkgdir}/usr/include/ksysguard \
|
|
${pkgdir}/usr/include/ksgrd
|
|
# remove dev symlink
|
|
rm -f \
|
|
${pkgdir}/usr/lib/liblsofui.so \
|
|
${pkgdir}/usr/lib/libprocessui.so \
|
|
${pkgdir}/usr/lib/libksignalplotter.so \
|
|
${pkgdir}/usr/lib/libprocesscore.so \
|
|
${pkgdir}/usr/lib/libksgrd.so
|
|
}
|
|
|
|
package_libkworkspace4()
|
|
{
|
|
pkgdesc=("KDE4 version of libkworkspace")
|
|
depends=("kdelibs")
|
|
|
|
cd "${pkgbase}-${pkgver}/libs/kworkspace"
|
|
make DESTDIR=${pkgdir} install
|
|
}
|