mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
Add kdeplasma-applets-smoothtasks
This commit is contained in:
parent
6bf13736f8
commit
1e8d777351
91
kdeplasma-applets-smoothtasks/PKGBUILD
Normal file
91
kdeplasma-applets-smoothtasks/PKGBUILD
Normal file
@ -0,0 +1,91 @@
|
||||
#
|
||||
# Apps Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=kdeplasma-applets-smoothtasks
|
||||
pkgver=wip_2010_02_27
|
||||
pkgrel=1
|
||||
|
||||
url="http://kde-look.org/content/show.php/Smooth+Tasks?content=101586"
|
||||
pkgdesc="A taskbar replacement Plasmoid with window peeking similar to Windows 7."
|
||||
license=('GPLv2')
|
||||
|
||||
arch=('x86_64' 'i686')
|
||||
|
||||
# Added an extra '_' to the following variables to override makepkg's default versioning scheme
|
||||
__hgroot="http://bitbucket.org/panzi"
|
||||
__hgrepo="smooth-tasks"
|
||||
|
||||
md5sums=()
|
||||
|
||||
depends=('kdebase-workspace')
|
||||
makedepends=('automoc4' 'cmake' 'mercurial' 'coreutils' 'perl')
|
||||
|
||||
### NOTE ###################################################
|
||||
# To get the most up-to-date version of this plasmoid, you #
|
||||
# don't have to wait for me to update the PKGBUILD -- the #
|
||||
# way I've engineered it, simply running `makepkg -f' is #
|
||||
# enough. #
|
||||
############################################################
|
||||
|
||||
function build()
|
||||
{
|
||||
# Checkout / Update the plasmoid's source
|
||||
if [[ -d "${__hgrepo}/.hg" ]]; then
|
||||
( cd "${__hgrepo}" && hg pull -u )
|
||||
else
|
||||
hg clone "${__hgroot}/${__hgrepo}"
|
||||
fi
|
||||
|
||||
# Copy the source to a build directory
|
||||
cp -a "${__hgrepo}" "${__hgrepo}-build" &&
|
||||
cd "${__hgrepo}-build" || return 1
|
||||
|
||||
# Compile the plasmoid
|
||||
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release || return 1
|
||||
make || return 1
|
||||
|
||||
# Hack to get the correct pkgver :)
|
||||
pkgver="$(head -n 1 ChangeLog | perl -pe 's|^.*(wip)\s+(\d{4})-(\d{2})-(\d{2}).*$|\1_\2_\3_\4|')"
|
||||
|
||||
# Make sure the pkgver is not null
|
||||
if [[ -n "${pkgver}" ]]; then
|
||||
export pkgver="${pkgver}"
|
||||
echo "${pkgver}" > "${pkgname}-pkgver.txt"
|
||||
fi
|
||||
}
|
||||
|
||||
function package()
|
||||
{
|
||||
cd "${__hgrepo}-build"
|
||||
|
||||
# Install the plasmoid
|
||||
make DESTDIR="${pkgdir}" install || return 1
|
||||
|
||||
# Get the correct pkgver
|
||||
if [[ -f "${pkgname}-pkgver.txt" ]]; then
|
||||
pkgver="$(cat ${pkgname}-pkgver.txt)"
|
||||
|
||||
# Export the pkgver if it is not null
|
||||
if [[ -n "${pkgver}" ]]; then
|
||||
export pkgver="${pkgver}"
|
||||
|
||||
# Set the correct pkgver in the PKGBUILD
|
||||
perl -pi -e "s|^(\t?)pkgver=wip_\d{4}_\d{2}_\d{2}$|\1pkgver=${pkgver}|g" "${startdir}/PKGBUILD"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Remove the build directory
|
||||
cd "${srcdir}" &&
|
||||
rm -rf "${__hgrepo}-build"
|
||||
|
||||
# A little something for the AUR ...
|
||||
:<<-'EOF'
|
||||
pkgver=wip_2010_02_27
|
||||
EOF
|
||||
}
|
Loading…
Reference in New Issue
Block a user