update cinstall

This commit is contained in:
amnon 2010-06-22 13:15:23 +00:00
parent 6f06489ede
commit a934369596
2 changed files with 118 additions and 3 deletions

View File

@ -9,13 +9,13 @@
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=cinstall
pkgver=20100618
pkgrel=5
pkgver=20100622
pkgrel=1
depends=('kdelibs' 'qt' )
pkgdesc="Drake Justice's Bundle Creator/Launcher and Package-Manager"
arch=("i686" "x86_64")
license=('GPL')
#install=$pkgname.install
install=$pkgname.install
url="http://chakra-project.org/"
optdepends=('akabei: for akabei support'
'pacman: for pacman support')

115
cinstall/cinstall.install Normal file
View File

@ -0,0 +1,115 @@
post_install() {
if [ -e "/etc/chakra/updates.conf" ] ; then
. /etc/chakra/updates.conf
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
/usr/bin/chakra-update-icons
fi
else
echo " > WARNING"
echo " The package kde-common seems not to be installed,"
echo " this can possibly break the installation. Just install it"
echo " manually after this installation/update, run the following"
echo " commands and restart KDE afterwards:"
echo " sudo chakra-config-updater"
echo " kbuildsycoca4"
echo " "
fi
echo "Create group bundle"
if [ "Group: `grep bundle /etc/group`" = "Group: " ] ; then
groupadd bundle
else
echo "Group bundle already exists"
fi
echo "Adding all existing users to group bundle"
for i in `cat /etc/passwd | grep /home | cut -d: -f1` ; do
echo " - adding user $i"
usermod -a -G bundle $i
done
echo "Mod sudoers file"
if [ "sudoers: `grep bundle /etc/sudoers`" = "sudoers: " ] ; then
echo "%bundle ALL=(ALL) NOPASSWD: /sbin/mount -o loop -t squashfs" >> /etc/sudoers
echo "ensure correct sudoers permissions"
chmod -v 0440 /etc/sudoers
else
echo "sudoers file already modded"
fi
}
post_upgrade() {
if [ -e "/etc/chakra/updates.conf" ] ; then
. /etc/chakra/updates.conf
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
/usr/bin/chakra-update-icons
fi
else
echo " > WARNING"
echo " The package kde-common seems not to be installed,"
echo " this can possibly break the installation. Just install it"
echo " manually after this installation/update, run the following"
echo " commands and restart KDE afterwards:"
echo " sudo chakra-config-updater"
echo " kbuildsycoca4"
echo " "
fi
echo "Create group bundle"
if [ "Group: `grep bundle /etc/group`" = "Group: " ] ; then
groupadd bundle
else
echo "Group bundle already exists"
fi
echo "Adding all existing users to group bundle"
for i in `cat /etc/passwd | grep /home | cut -d: -f1` ; do
echo " - adding user $i"
usermod -a -G bundle $i
done
echo "Mod sudoers file"
if [ "sudoers: `grep bundle /etc/sudoers`" = "sudoers: " ] ; then
echo "%bundle ALL=(ALL) NOPASSWD: /sbin/mount -o loop -t squashfs" >> /etc/sudoers
echo "ensure correct sudoers permissions"
chmod -v 0440 /etc/sudoers
else
echo "sudoers file already modded"
fi
}
post_remove() {
if [ -e "/etc/chakra/updates.conf" ] ; then
. /etc/chakra/updates.conf
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
/usr/bin/chakra-update-icons
fi
else
echo " > WARNING"
echo " The package kde-common seems not to be installed,"
echo " this can possibly break the installation. Just install it"
echo " manually after this installation/update, run the following"
echo " commands and restart KDE afterwards:"
echo " sudo chakra-config-updater"
echo " kbuildsycoca4"
echo " "
fi
}
op=$1
shift
$op $*