#!/usr/bin/python2.5
# -*- coding: utf-8 -*-
## 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; version 2 only.
##
## 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.
##
import py2deb
import os
if __name__ == "__main__":
try:
os.chdir(os.path.dirname(sys.argv[0]))
except:
pass
print
p=py2deb.Py2deb("drinkcounter") #This is the package name and MUST be in lowercase! (using e.g. "mClock" fails miserably...)
p.description="Count how many drinks do you have and calculate how many alcohol is in your blood.\nDont trust this value, its estimated...but maybe this software helps you with payment if you dont remember ;)"
p.author="Andreas Weidlinger"
p.mail="andreas.weidlinger@gmail.com"
p.depends = "libqt4-core, libqt4-gui, libstdc++6"
p.section="user/utilities"
p.icon = "/home/user/drinkCounter/drinkCounter.png"
p.arch="armel" #should be all for python, any for all arch
p.urgency="low" #not used in maemo onl for deb os
p.distribution="fremantle-1.2"
p.repository="extras-devel"
p.xsbc_bugtracker="http://bugs.maemo.org"
# p.postinstall="""#!/bin/sh
# chmod +x /usr/bin/mclock.py""" #Set here your post install script
# p.postremove="""#!/bin/sh
# chmod +x /usr/bin/mclock.py""" #Set here your post remove script
# p.preinstall="""#!/bin/sh
# chmod +x /usr/bin/mclock.py""" #Set here your pre install script
# p.preremove="""#!/bin/sh
# chmod +x /usr/bin/mclock.py""" #Set here your pre remove script
version = "0.6.2" #Version of your software, e.g. "1.2.0" or "0.8.2"
build = "4" #Build number, e.g. "1" for the first build of this version of your software. Increment for later re-builds of the same version of your software.
#Text with changelog information to be displayed in the package "Details" tab of the Maemo Application Manager
changeloginformation = "Fixed bugs, added car-drive estimation"
dir_name = "src" #Name of the subfolder containing your package source files (e.g. usr\share\icons\hicolor\scalable\myappicon.svg, usr\lib\myapp\somelib.py). We suggest to leave it named src in all projects and will refer to that in the wiki article on maemo.org
#Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list
for root, dirs, files in os.walk(dir_name):
real_dir = root[len(dir_name):]
fake_file = []
for f in files:
fake_file.append(root + os.sep + f + "|" + f)
if len(fake_file) > 0:
p[real_dir] = fake_file
print p
r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True)
TMP="/var/tmp" TEMP="/var/tmp" DEBIAN_FRONTEND="noninteractive" DEBIAN_PRIORITY="critical" DEB_BUILD_OPTIONS="parallel=4" TMPDIR="/var/tmp" dpkg-buildpackage: set CFLAGS to default value: -g -O2 dpkg-buildpackage: set CPPFLAGS to default value: dpkg-buildpackage: set LDFLAGS to default value: dpkg-buildpackage: set FFLAGS to default value: -g -O2 dpkg-buildpackage: set CXXFLAGS to default value: -g -O2 dpkg-buildpackage: source package drinkcounter dpkg-buildpackage: source version 0.6.2-4 dpkg-buildpackage: host architecture armel dpkg-checkbuilddeps: Using Scratchbox tools to satisfy builddeps fakeroot debian/rules clean dh_testdir dh_testroot rm -f build-stamp configure-stamp dh_clean dpkg-source -b drinkcounter-0.6.2 dpkg-source: info: using source format `1.0' dpkg-source: info: building drinkcounter in drinkcounter_0.6.2-4.tar.gz dpkg-source: info: building drinkcounter in drinkcounter_0.6.2-4.dsc debian/rules build dh_testdir # Add here commands to configure the package. touch configure-stamp dh_testdir touch build-stamp fakeroot debian/rules binary dh_testdir dh_testroot dh_clean -k dh_installdirs # ====================================================== #/scratchbox/tools/bin/make DESTDIR="/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter" install mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter" cp -a "src/usr/share/icons/hicolor/48x48/hildon/drinkCounter.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/usr/share/icons/hicolor/48x48/hildon/drinkCounter.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/usr/share/dbus-1/services/" cp -a "src/usr/share/dbus-1/services/drinkCounter.service" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/usr/share/dbus-1/services/drinkCounter.service" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/" cp -a "src/opt/core" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/core" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/" cp -a "src/opt/drinkCounter/core" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/core" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/" cp -a "src/opt/drinkCounter/drinkCounter" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkCounter" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/usr/share/applications/hildon/" cp -a "src/usr/share/applications/hildon/drinkCounter.desktop" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/usr/share/applications/hildon/drinkCounter.desktop" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/bigbeer.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/bigbeer.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/black.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/black.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/coctail.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/coctail.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/littlebeer.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/littlebeer.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/orange.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/orange.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/red.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/red.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/redwine.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/redwine.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/white.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/white.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/wine.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/wine.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/" cp -a "src/opt/drinkCounter/drinkImages/yellow.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/opt/drinkCounter/drinkImages/yellow.png" mkdir -p "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/usr/share/icons/hicolor/scalable/hildon/" cp -a "src/usr/share/icons/hicolor/scalable/hildon/drinkCounter.png" "/home/builder3/maemo-fremantle-armel-extras-devel/work/drinkcounter-0.6.2/debian/drinkcounter/usr/share/icons/hicolor/scalable/hildon/drinkCounter.png" # ====================================================== dh_testdir dh_testroot dh_installchangelogs debian/changelog dh_installdocs dh_installexamples dh_installman dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dpkg-shlibdeps: error: couldn't find library libQtGui.so.4 needed by debian/drinkcounter/opt/drinkCounter/drinkCounter (ELF format: 'elf32-littlearm'; RPATH: '/usr/lib'). Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file. To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH. dh_shlibdeps: dpkg-shlibdeps -Tdebian/drinkcounter.substvars debian/drinkcounter/opt/drinkCounter/drinkCounter returned exit code 2 make: *** [binary-arch] Error 9 dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2