2008-09-01 02:52:32 +07:00
|
|
|
default:
|
|
|
|
echo "sorry, no default action"
|
|
|
|
|
2009-04-06 12:04:18 +07:00
|
|
|
uninstall:
|
|
|
|
rm -rf /opt/relational
|
|
|
|
rm -f /usr/local/bin/relational
|
2009-04-08 01:09:36 +07:00
|
|
|
rm -f /usr/share/applications/relational.desktop
|
2009-04-06 12:04:18 +07:00
|
|
|
|
|
|
|
install:
|
|
|
|
mkdir /opt/relational
|
|
|
|
cp -R relational relational_gui /opt/relational/
|
|
|
|
cp relational_gui.py /opt/relational
|
|
|
|
chmod -R 555 /opt/relational/
|
|
|
|
echo "#!/bin/bash" > /usr/local/bin/relational
|
|
|
|
echo "/opt/relational/relational_gui.py" >> /usr/local/bin/relational
|
|
|
|
chmod 555 /usr/local/bin/relational
|
2009-04-08 01:09:36 +07:00
|
|
|
cp relational.desktop /usr/share/applications/
|
|
|
|
chmod a+r /usr/share/applications/relational.desktop
|
2009-04-06 12:04:18 +07:00
|
|
|
|
2009-02-24 08:32:00 +07:00
|
|
|
source: clean
|
|
|
|
rm -rf /tmp/relational/
|
|
|
|
mkdir /tmp/relational/
|
|
|
|
cp -R * /tmp/relational/
|
2010-07-02 10:07:26 +07:00
|
|
|
rm -rf /tmp/relational/windows /tmp/relational/samples/.svn/ /tmp/relational/debscript/.svn/ /tmp/relational/mac/.svn/ /tmp/relational/relational/.svn/ /tmp/relational/relational_gui/.svn/ /tmp/relational/mac /tmp/relational/debscript/ /tmp/relational/relational_curses/.svn/ /tmp/relational/relational_readline/.svn/
|
|
|
|
echo "cd /tmp ; tar -zcvvf relational.tar.gz relational/" | bash
|
|
|
|
mv /tmp/relational.tar.gz ./relational_`./relational_gui.py -v | grep Relational | cut -d" " -f2`.tar.gz
|
2009-02-24 08:32:00 +07:00
|
|
|
|
2008-09-01 02:52:32 +07:00
|
|
|
clean:
|
2009-02-24 08:32:00 +07:00
|
|
|
rm -rf *~ || echo ok
|
|
|
|
rm -rf *.pyc *.pyo || echo ok
|
2008-09-01 02:52:32 +07:00
|
|
|
rm -rf Relational.app || echo ok
|
2008-11-15 09:51:04 +07:00
|
|
|
rm relational*.tar.gz || echo ok
|
2009-03-02 10:29:11 +07:00
|
|
|
rm -rf relational_mac
|
2008-11-15 09:33:02 +07:00
|
|
|
rm -rf data || echo ok
|
2009-02-24 08:32:00 +07:00
|
|
|
rm -rf *tar.bz || echo ok
|
2008-11-15 09:33:02 +07:00
|
|
|
rm -rf *.deb || echo ok
|
2009-03-02 10:29:11 +07:00
|
|
|
rm -rf relational/*~ || echo ok
|
|
|
|
rm -rf relational/*.pyc *.pyo || echo ok
|
|
|
|
rm -rf relational_gui/*~ || echo ok
|
|
|
|
rm -rf relational_gui/*.pyc *.pyo || echo ok
|
2009-03-08 03:31:39 +07:00
|
|
|
rm -rf relational_mac
|
2008-09-01 02:52:32 +07:00
|
|
|
mac: app
|
2009-03-02 10:29:11 +07:00
|
|
|
mkdir relational_mac || echo Exists
|
|
|
|
mv Relational.app relational_mac
|
|
|
|
mkdir relational_mac/samples || echo Exists
|
|
|
|
cp samples/*csv relational_mac/samples
|
|
|
|
tar -zcvvf relational_`./relational_gui.py -v`.tar.gz relational_mac/
|
2009-03-08 03:31:39 +07:00
|
|
|
rm -rf relational_mac
|
2008-09-01 02:52:32 +07:00
|
|
|
app:
|
2009-03-08 04:46:29 +07:00
|
|
|
mkdir -p Relational.app/Contents/Resources || echo Exists
|
2008-09-01 02:52:32 +07:00
|
|
|
cp *py Relational.app/Contents/Resources
|
2009-03-08 04:46:29 +07:00
|
|
|
mkdir -p Relational.app/Contents/Resources/relational || echo Exists
|
2009-03-02 10:29:11 +07:00
|
|
|
cp relational/*py Relational.app/Contents/Resources/relational
|
2009-03-08 04:46:29 +07:00
|
|
|
mkdir -p Relational.app/Contents/Resources/relational_gui || echo Exists
|
2009-03-02 10:29:11 +07:00
|
|
|
cp relational_gui/*py Relational.app/Contents/Resources/relational_gui
|
2008-09-01 02:52:32 +07:00
|
|
|
cp mac/Info.plist mac/PkgInfo Relational.app/Contents
|
2009-03-08 04:46:29 +07:00
|
|
|
mkdir -p Relational.app/Contents/MacOS || echo Exists
|
|
|
|
cp mac/relational_gui mac/Python Relational.app/Contents/MacOS
|
|
|
|
cp mac/PythonApplet.icns mac/__argvemulator_relational_gui.py Relational.app/Contents/Resources/
|
2008-11-15 09:33:02 +07:00
|
|
|
|
2008-11-15 09:51:04 +07:00
|
|
|
debian:
|
2008-11-15 09:33:02 +07:00
|
|
|
#Python files
|
2008-11-15 11:09:31 +07:00
|
|
|
mkdir -p data/usr/share/python-support/relational/
|
2009-03-02 10:29:11 +07:00
|
|
|
mkdir -p data/usr/share/python-support/relational/relational_gui
|
|
|
|
mkdir -p data/usr/share/python-support/relational/relational
|
2008-11-15 09:33:02 +07:00
|
|
|
cp *py data/usr/share/python-support/relational/
|
2009-03-02 10:29:11 +07:00
|
|
|
cp relational/*py data/usr/share/python-support/relational/relational/
|
|
|
|
cp relational_gui/*py data/usr/share/python-support/relational/relational_gui
|
2008-11-15 11:09:31 +07:00
|
|
|
#man
|
|
|
|
mkdir -p data/usr/share/man/man1
|
|
|
|
cp relational.1 data/usr/share/man/man1
|
|
|
|
gzip --best data/usr/share/man/man1/relational.1
|
2008-11-15 09:33:02 +07:00
|
|
|
#doc
|
2008-11-15 11:09:31 +07:00
|
|
|
mkdir -p data/usr/share/doc/relational
|
|
|
|
echo "Copyright (C) 2008 Salvo "LtWorf" Tomaselli" >> data/usr/share/doc/relational/copyright
|
|
|
|
echo "" >> data/usr/share/doc/relational/copyright
|
|
|
|
echo "License:" >> data/usr/share/doc/relational/copyright
|
|
|
|
echo "This program is under the GPLv3 license" >> data/usr/share/doc/relational/copyright
|
2008-11-15 09:33:02 +07:00
|
|
|
cp CHANGELOG data/usr/share/doc/relational/changelog
|
2009-03-02 10:29:11 +07:00
|
|
|
echo "relational ("`./relational_gui.py -v | cut -d. -f1`":"`./relational_gui.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`") unstable; urgency=low" >> data/usr/share/doc/relational/changelog.Debian
|
2008-11-15 11:09:31 +07:00
|
|
|
echo "" >> data/usr/share/doc/relational/changelog.Debian
|
|
|
|
echo " * Automatically generated package, see changelog.gz" >> data/usr/share/doc/relational/changelog.Debian
|
|
|
|
echo "" >> data/usr/share/doc/relational/changelog.Debian
|
|
|
|
echo " -- Make <make@make.org> Fri, 10 Oct 2008 19:18:35 +0200">> data/usr/share/doc/relational/changelog.Debian
|
|
|
|
gzip --best data/usr/share/doc/relational/changelog.Debian
|
|
|
|
gzip --best data/usr/share/doc/relational/changelog
|
2008-11-15 09:33:02 +07:00
|
|
|
cp -r samples data/usr/share/doc/relational/examples
|
|
|
|
rm -rf data/usr/share/doc/relational/examples/.svn
|
|
|
|
#start script
|
2008-11-15 11:09:31 +07:00
|
|
|
mkdir -p data/usr/bin
|
2009-02-26 05:18:07 +07:00
|
|
|
cp debscript/relational data/usr/bin/relational
|
2008-11-15 09:33:02 +07:00
|
|
|
chmod a+x data/usr/bin/relational
|
|
|
|
#desktop file
|
2008-11-15 11:09:31 +07:00
|
|
|
mkdir -p data/usr/share/applications/
|
2010-02-23 18:46:58 +07:00
|
|
|
cp debscript/relational.desktop data/usr/share/applications/
|
2008-11-15 11:09:31 +07:00
|
|
|
mkdir -p data/DEBIAN
|
2008-11-15 09:33:02 +07:00
|
|
|
#package description
|
2009-02-26 06:58:20 +07:00
|
|
|
debscript/gencontrol.sh > data/DEBIAN/control
|
2009-03-04 15:22:42 +07:00
|
|
|
#cp debscript/rules data/DEBIAN
|
2008-12-09 11:24:24 +07:00
|
|
|
#Postrm file to remove optimized generated python files
|
2009-02-26 06:58:20 +07:00
|
|
|
cp debscript/prerm data/DEBIAN/prerm
|
|
|
|
cp debscript/postinst data/DEBIAN/postinst
|
2008-12-09 11:47:45 +07:00
|
|
|
chmod 0755 data/DEBIAN/prerm data/DEBIAN/postinst
|
2009-09-09 08:17:38 +07:00
|
|
|
fakeroot -- chown -R root:root data/*
|
|
|
|
fakeroot -- dpkg -b data/ relational.deb
|
|
|
|
fakeroot -- rm -rf data/
|
2009-03-02 10:29:11 +07:00
|
|
|
cp relational.deb relational_`./relational_gui.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`.deb
|
2008-11-15 09:51:04 +07:00
|
|
|
rm -f relational.deb
|