#!/bin/bash WRKDIR="`pwd`" rm -rf dpkg mkdir -p dpkg #make distclean #./configure make dist-gzip mv sunxi-tools-1.0.tar.gz dpkg/sunxi-tools_1.0.orig.tar.gz cd dpkg tar -xzvf sunxi-tools_1.0.orig.tar.gz cd sunxi-tools-1.0 mkdir debian echo "sunxi-tools (1.0-1) UNRELEASED; urgency=low" > debian/changelog git log -1 --pretty=format:'%n * %s%n%n -- %cn <%ce> %cD%n' >> debian/changelog echo "9" > debian/compat cat > debian/control < Section: misc Priority: optional Standards-Version: 3.9.4 Build-Depends: debhelper (>= 8) Package: sunxi-tools Architecture: any Depends: \${shlibs:Depends}, \${misc:Depends} Description: Tools to help hacking Allwinner A10/A20 based devices Tools to help hacking Allwinner A10 (aka sun4i) based devices and possibly it's successors, that's why the 'x' in the package name. EOF cat > debian/copyright < 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 dated June, 1991. 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. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2. EOF cat > debian/rules < debian/source/format debuild -us -uc cd ${WRKDIR} mv dpkg/*.deb . rm -rf dpkg