Newer
Older
#!/bin/sh
#
# Copyright (C) 2011 Rubén Rodríguez <ruben@trisquel.info>
# Copyright (C) 2015 Francisco Parra <franparpe@openmailbox.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
. ./config
rm debian/examples compton.sample.conf
cat << EOF >> debian/install
compton.conf /etc
compton-autostart.desktop /etc/xdg/autostart
compton-launcher /usr/bin
EOF
cat << EOF > compton-autostart.desktop
[Desktop Entry]
Type=Application
Name=Compton composition manager
Exec=compton-launcher
NoDisplay=true
X-GNOME-AutoRestart=true
X-GNOME-Autostart-Phase=Initialization
OnlyShowIn=GNOME;
EOF
cat << EOF > compton-launcher
#!/bin/sh
[ \$DESKTOP_SESSION = "trisquel-session" ] || exit 0
[ -f \$HOME/.config/disable-compton ] && exit 0
[ -f \$HOME/.config/compton.conf ] && FILE="\$HOME/.config/compton.conf"
[ 0 != \$(glxinfo |grep "renderer string:" |grep -v llvmpipe | wc -c) ] && exec compton --config \$FILE &
EOF
sed 's/^Depends:/Depends: mesa-utils, /' debian/control* -i
chmod 755 compton-launcher
changelog "Backported into Toutatis"
compile