From 6050e5d0e2fe7e5bbf0b3b49b27aa792a4e3f7dc Mon Sep 17 00:00:00 2001 From: dolik Date: Thu, 26 Jan 2012 20:15:10 +0000 Subject: [PATCH] .lpbuild: basics of new deb packaging (RM #244) git-svn-id: svn://ultimatepp.org/upp/trunk@4472 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppbox/lpbuild2/Makefile | 30 + uppbox/lpbuild2/copyright | 4 + uppbox/lpbuild2/debian/compat | 1 + uppbox/lpbuild2/debian/control | 57 ++ uppbox/lpbuild2/debian/dirs | 1 + uppbox/lpbuild2/debian/rules | 4 + uppbox/lpbuild2/debian/source/format | 1 + uppbox/lpbuild2/debian/theide-nogtk.install | 6 + uppbox/lpbuild2/debian/theide-nogtk.postinst | 74 +++ uppbox/lpbuild2/debian/theide-nogtk.prerm | 39 ++ uppbox/lpbuild2/debian/theide.install | 6 + uppbox/lpbuild2/debian/theide.postinst | 74 +++ uppbox/lpbuild2/debian/theide.prerm | 39 ++ uppbox/lpbuild2/debian/umk.install | 2 + uppbox/lpbuild2/debian/umk.postinst | 74 +++ uppbox/lpbuild2/debian/umk.prerm | 39 ++ uppbox/lpbuild2/debian/upp.install | 2 + uppbox/lpbuild2/debian/watch | 7 + uppbox/lpbuild2/dput.cfg | 34 ++ uppbox/lpbuild2/lpbuild.sh | 67 +++ uppbox/lpbuild2/mkfile | 576 +++++++++++++++++++ uppbox/lpbuild2/theide.1 | 180 ++++++ uppbox/lpbuild2/theide.desktop | 12 + 23 files changed, 1329 insertions(+) create mode 100644 uppbox/lpbuild2/Makefile create mode 100644 uppbox/lpbuild2/copyright create mode 100644 uppbox/lpbuild2/debian/compat create mode 100644 uppbox/lpbuild2/debian/control create mode 100644 uppbox/lpbuild2/debian/dirs create mode 100755 uppbox/lpbuild2/debian/rules create mode 100644 uppbox/lpbuild2/debian/source/format create mode 100644 uppbox/lpbuild2/debian/theide-nogtk.install create mode 100644 uppbox/lpbuild2/debian/theide-nogtk.postinst create mode 100644 uppbox/lpbuild2/debian/theide-nogtk.prerm create mode 100644 uppbox/lpbuild2/debian/theide.install create mode 100644 uppbox/lpbuild2/debian/theide.postinst create mode 100644 uppbox/lpbuild2/debian/theide.prerm create mode 100644 uppbox/lpbuild2/debian/umk.install create mode 100644 uppbox/lpbuild2/debian/umk.postinst create mode 100644 uppbox/lpbuild2/debian/umk.prerm create mode 100644 uppbox/lpbuild2/debian/upp.install create mode 100644 uppbox/lpbuild2/debian/watch create mode 100644 uppbox/lpbuild2/dput.cfg create mode 100755 uppbox/lpbuild2/lpbuild.sh create mode 100755 uppbox/lpbuild2/mkfile create mode 100644 uppbox/lpbuild2/theide.1 create mode 100644 uppbox/lpbuild2/theide.desktop diff --git a/uppbox/lpbuild2/Makefile b/uppbox/lpbuild2/Makefile new file mode 100644 index 000000000..094a73890 --- /dev/null +++ b/uppbox/lpbuild2/Makefile @@ -0,0 +1,30 @@ +build: ide ide-nogtk umk + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + JOBS=-j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +else + JOBS= +endif + +ide: + sed -i -e 's/IDE_VERSION[ \t]*"\([0-9]*\)[^"]*"/IDE_VERSION "\1-'$(SERIES)-$(ARCH)'"/' $(CURDIR)/uppsrc/ide/version.h + $(MAKE) -f mkfile $(JOBS) PKG=ide $(compiler) "NESTS=uppsrc" "FLAGS=GUI MT GCC SHARED" BINEXT= "BINPREFIX=" + #cp /usr/bin/theide $@ + +ide-nogtk: + sed -i -e 's/IDE_VERSION[ \t]*"\([0-9]*\)[^"]*"/IDE_VERSION "\1-'$(SERIES)-$(ARCH)'-nogtk"/' $(CURDIR)/uppsrc/ide/version.h + $(MAKE) -f mkfile $(JOBS) PKG=ide $(compiler) "NESTS=uppsrc" "FLAGS=GUI MT NOGTK GCC SHARED" BINEXT=-nogtk "BINPREFIX=" + #cp /usr/bin/theide $@ + +umk: + $(MAKE) -f mkfile $(JOBS) PKG=umk $(compiler) "NESTS=uppsrc" "FLAGS=GCC SHARED" BINEXT= "BINPREFIX=" + #cp /usr/bin/theide $@ + +install: + # this is just a trick to rename files + install -D ide $(DESTDIR)/theide + install -D ide-nogtk $(DESTDIR)/nogtk/theide + install -D uppsrc/ide/theide-48.png $(DESTDIR)/theide.png + +clean: + rm -f ide ide-nogtk umk diff --git a/uppbox/lpbuild2/copyright b/uppbox/lpbuild2/copyright new file mode 100644 index 000000000..c43990e5c --- /dev/null +++ b/uppbox/lpbuild2/copyright @@ -0,0 +1,4 @@ +Copyright © 1999-2012 Ultimate++ team (http://ultimatepp.org) +Authors: Mirek Fídler, Koldo Ramirez, Tomáš Rylek, Daniel Kos + +License: BSD (please see /usr/share/common-licenses/BSD). diff --git a/uppbox/lpbuild2/debian/compat b/uppbox/lpbuild2/debian/compat new file mode 100644 index 000000000..7ed6ff82d --- /dev/null +++ b/uppbox/lpbuild2/debian/compat @@ -0,0 +1 @@ +5 diff --git a/uppbox/lpbuild2/debian/control b/uppbox/lpbuild2/debian/control new file mode 100644 index 000000000..a99c3dfb3 --- /dev/null +++ b/uppbox/lpbuild2/debian/control @@ -0,0 +1,57 @@ +Source: upp +Section: devel +Priority: optional +Maintainer: Jan Dolinar +Standards-Version: 3.8.4 +Build-Depends: g++ (= 4.1) | g++ (>= 4.3), debhelper, libx11-dev (>= 1.0.0), libxft-dev (>= 2.1.8), libpng12-dev (>= 1.2.8), libgtk2.0-dev (>= 2.8.17), libnotify-dev +Homepage: http://www.ultimatepp.org + +Package: upp +Architecture: all +Depends: theide, g++ (= 4.1) | g++ (>= 4.3), libx11-dev (>= 1.0.0), libxft-dev (>= 2.1.8), libpng12-dev (>= 1.2.8), libgtk2.0-dev (>= 2.8.17), libnotify-dev +Description: C++ library for cross-platform development + Ultimate++ is a radical and innovative GUI toolkit whose number one priority + is programmer productivity. C++ is a great programming language but + C++ programmers are sometimes hampered by the lack of effective libraries. + U++ libraries enable genuine productivity gains with shorter development + times and greatly reduced application source code size. + +Package: theide +Architecture: any +Depends: ${shlibs:Depends} +Replaces: upp (<= 2332) +Description: IDE (not only) for Ultimate++ framework + TheIDE introduces modular concepts to C++ programming. It features + BLITZ-build technology to speedup C++ rebuilds up to 4 times, Visual + designers for U++ libraries, Topic++ system for documenting code + and creating rich text resources for applications (like help and code + documentation) and Assist++ - a powerful C++ code analyzer that provides + features like code completion, navigation and transformation. + +Package: theide-nogtk +Architecture: any +Depends: ${shlibs:Depends} +Provides: theide +Replaces: theide, upp (<=2332) +Conflicts: theide +Description: IDE (not only) for Ultimate++ framework [nogtk build] + TheIDE introduces modular concepts to C++ programming. It features + BLITZ-build technology to speedup C++ rebuilds up to 4 times, Visual + designers for Ultimate++ libraries, Topic++ system for documenting code + and creating rich text resources for applications (like help and code + documentation) and Assist++ - a powerful C++ code analyzer that provides + features like code completion, navigation and transformation. + . + This package contains TheIDE built with simpler look to reduce + package dependencies. + +Package: umk +Architecture: any +Depends: ${shlibs:Depends} +Provides: theide +Replaces: theide, upp (<=2332) +Conflicts: theide +Description: Command line builder for Ultimate++ projects + For those who need to build U++ packages from scripts or in minimalistic + environments, umk utility provides simple building solution. It fully supports + all the build-related features provided by TheIDE, without the actual IDE. diff --git a/uppbox/lpbuild2/debian/dirs b/uppbox/lpbuild2/debian/dirs new file mode 100644 index 000000000..b4ac2af8b --- /dev/null +++ b/uppbox/lpbuild2/debian/dirs @@ -0,0 +1 @@ +usr/share/upp diff --git a/uppbox/lpbuild2/debian/rules b/uppbox/lpbuild2/debian/rules new file mode 100755 index 000000000..98f3af311 --- /dev/null +++ b/uppbox/lpbuild2/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ diff --git a/uppbox/lpbuild2/debian/source/format b/uppbox/lpbuild2/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/uppbox/lpbuild2/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/uppbox/lpbuild2/debian/theide-nogtk.install b/uppbox/lpbuild2/debian/theide-nogtk.install new file mode 100644 index 000000000..3085d11a3 --- /dev/null +++ b/uppbox/lpbuild2/debian/theide-nogtk.install @@ -0,0 +1,6 @@ +debian/tmp/nogtk/theide usr/bin +umk usr/bin +theide.1 usr/share/man1 +theide.desktop usr/share/applications +debian/tmp/theide.png usr/share/pixmaps +copyright usr/share/doc/theide-nogtk diff --git a/uppbox/lpbuild2/debian/theide-nogtk.postinst b/uppbox/lpbuild2/debian/theide-nogtk.postinst new file mode 100644 index 000000000..15d90a4e4 --- /dev/null +++ b/uppbox/lpbuild2/debian/theide-nogtk.postinst @@ -0,0 +1,74 @@ +#!/bin/sh +# postinst script for upp +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +create_bm(){ + echo "Configuring build method $2 for $1" + cat > "/usr/share/upp/$2.bm" << EOF +BUILDER = "GCC"; +COMPILER = "$1"; +DEBUG_INFO = "2"; +DEBUG_BLITZ = "1"; +DEBUG_LINKMODE = "1"; +DEBUG_OPTIONS = "-O0"; +DEBUG_FLAGS = ""; +RELEASE_BLITZ = "0"; +RELEASE_LINKMODE = "1"; +RELEASE_OPTIONS = "-O3 -ffunction-sections -fdata-sections"; +RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20 -ffunction-sections -fdata-sections"; +RELEASE_FLAGS = ""; +RELEASE_LINK = "-Wl,--gc-sections"; +DEBUGGER = "gdb"; +PATH = ""; +INCLUDE = "/usr/include/freetype2;/usr/include/gtk-2.0;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/lib/gtk-2.0/include;/usr/include/cairo;/usr/include/pango-1.0;/usr/include/atk-1.0;/usr/include/gdk-pixbuf-2.0;/usr/lib/i386-linux-gnu/glib-2.0/include;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/lib/i386-linux-gnu/gtk-2.0/include;/usr/lib/x86_64-linux-gnu/gtk-2.0/include;/usr/include/gtk-3.0/gdk" +LIB = "/usr/X11R6/lib"; +REMOTE_HOST = ""; +REMOTE_OS = ""; +REMOTE_TRANSFER = ""; +REMOTE_MAP = ""; +LINKMODE_LOCK = "0"; +EOF + chmod 644 /usr/share/upp/$2.bm +} + +case "$1" in + configure) + [ "`which g++ 2>/dev/null`" ] && create_bm "g++" "GCC" || true + [ "`which clang++ 2>/dev/null`" ] && create_bm "clang++" "CLANG" || true + for v in `seq 9 -1 3` 1 0; do + [ "`which g++-4.$v 2>/dev/null`" ] && create_bm "g++-4.$v" "GCC4.$v" || true + done + [ "`ls /usr/share/upp/*.bm`" ] || create_bm "g++" "GCC" + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + rm -f /usr/share/upp/*.bm + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/uppbox/lpbuild2/debian/theide-nogtk.prerm b/uppbox/lpbuild2/debian/theide-nogtk.prerm new file mode 100644 index 000000000..58eec6d7a --- /dev/null +++ b/uppbox/lpbuild2/debian/theide-nogtk.prerm @@ -0,0 +1,39 @@ +#!/bin/sh +# prerm script for upp +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + rm -f /usr/share/upp/*.bm + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/uppbox/lpbuild2/debian/theide.install b/uppbox/lpbuild2/debian/theide.install new file mode 100644 index 000000000..d3bd76797 --- /dev/null +++ b/uppbox/lpbuild2/debian/theide.install @@ -0,0 +1,6 @@ +debian/tmp/theide usr/bin +umk usr/bin +theide.1 usr/share/man1 +theide.desktop usr/share/applications +debian/tmp/theide.png usr/share/pixmaps +copyright usr/share/doc/theide diff --git a/uppbox/lpbuild2/debian/theide.postinst b/uppbox/lpbuild2/debian/theide.postinst new file mode 100644 index 000000000..15d90a4e4 --- /dev/null +++ b/uppbox/lpbuild2/debian/theide.postinst @@ -0,0 +1,74 @@ +#!/bin/sh +# postinst script for upp +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +create_bm(){ + echo "Configuring build method $2 for $1" + cat > "/usr/share/upp/$2.bm" << EOF +BUILDER = "GCC"; +COMPILER = "$1"; +DEBUG_INFO = "2"; +DEBUG_BLITZ = "1"; +DEBUG_LINKMODE = "1"; +DEBUG_OPTIONS = "-O0"; +DEBUG_FLAGS = ""; +RELEASE_BLITZ = "0"; +RELEASE_LINKMODE = "1"; +RELEASE_OPTIONS = "-O3 -ffunction-sections -fdata-sections"; +RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20 -ffunction-sections -fdata-sections"; +RELEASE_FLAGS = ""; +RELEASE_LINK = "-Wl,--gc-sections"; +DEBUGGER = "gdb"; +PATH = ""; +INCLUDE = "/usr/include/freetype2;/usr/include/gtk-2.0;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/lib/gtk-2.0/include;/usr/include/cairo;/usr/include/pango-1.0;/usr/include/atk-1.0;/usr/include/gdk-pixbuf-2.0;/usr/lib/i386-linux-gnu/glib-2.0/include;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/lib/i386-linux-gnu/gtk-2.0/include;/usr/lib/x86_64-linux-gnu/gtk-2.0/include;/usr/include/gtk-3.0/gdk" +LIB = "/usr/X11R6/lib"; +REMOTE_HOST = ""; +REMOTE_OS = ""; +REMOTE_TRANSFER = ""; +REMOTE_MAP = ""; +LINKMODE_LOCK = "0"; +EOF + chmod 644 /usr/share/upp/$2.bm +} + +case "$1" in + configure) + [ "`which g++ 2>/dev/null`" ] && create_bm "g++" "GCC" || true + [ "`which clang++ 2>/dev/null`" ] && create_bm "clang++" "CLANG" || true + for v in `seq 9 -1 3` 1 0; do + [ "`which g++-4.$v 2>/dev/null`" ] && create_bm "g++-4.$v" "GCC4.$v" || true + done + [ "`ls /usr/share/upp/*.bm`" ] || create_bm "g++" "GCC" + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + rm -f /usr/share/upp/*.bm + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/uppbox/lpbuild2/debian/theide.prerm b/uppbox/lpbuild2/debian/theide.prerm new file mode 100644 index 000000000..58eec6d7a --- /dev/null +++ b/uppbox/lpbuild2/debian/theide.prerm @@ -0,0 +1,39 @@ +#!/bin/sh +# prerm script for upp +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + rm -f /usr/share/upp/*.bm + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/uppbox/lpbuild2/debian/umk.install b/uppbox/lpbuild2/debian/umk.install new file mode 100644 index 000000000..8fddb85d4 --- /dev/null +++ b/uppbox/lpbuild2/debian/umk.install @@ -0,0 +1,2 @@ +umk usr/bin +copyright usr/share/doc/umk diff --git a/uppbox/lpbuild2/debian/umk.postinst b/uppbox/lpbuild2/debian/umk.postinst new file mode 100644 index 000000000..15d90a4e4 --- /dev/null +++ b/uppbox/lpbuild2/debian/umk.postinst @@ -0,0 +1,74 @@ +#!/bin/sh +# postinst script for upp +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +create_bm(){ + echo "Configuring build method $2 for $1" + cat > "/usr/share/upp/$2.bm" << EOF +BUILDER = "GCC"; +COMPILER = "$1"; +DEBUG_INFO = "2"; +DEBUG_BLITZ = "1"; +DEBUG_LINKMODE = "1"; +DEBUG_OPTIONS = "-O0"; +DEBUG_FLAGS = ""; +RELEASE_BLITZ = "0"; +RELEASE_LINKMODE = "1"; +RELEASE_OPTIONS = "-O3 -ffunction-sections -fdata-sections"; +RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20 -ffunction-sections -fdata-sections"; +RELEASE_FLAGS = ""; +RELEASE_LINK = "-Wl,--gc-sections"; +DEBUGGER = "gdb"; +PATH = ""; +INCLUDE = "/usr/include/freetype2;/usr/include/gtk-2.0;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/lib/gtk-2.0/include;/usr/include/cairo;/usr/include/pango-1.0;/usr/include/atk-1.0;/usr/include/gdk-pixbuf-2.0;/usr/lib/i386-linux-gnu/glib-2.0/include;/usr/lib/x86_64-linux-gnu/glib-2.0/include;/usr/lib/i386-linux-gnu/gtk-2.0/include;/usr/lib/x86_64-linux-gnu/gtk-2.0/include;/usr/include/gtk-3.0/gdk" +LIB = "/usr/X11R6/lib"; +REMOTE_HOST = ""; +REMOTE_OS = ""; +REMOTE_TRANSFER = ""; +REMOTE_MAP = ""; +LINKMODE_LOCK = "0"; +EOF + chmod 644 /usr/share/upp/$2.bm +} + +case "$1" in + configure) + [ "`which g++ 2>/dev/null`" ] && create_bm "g++" "GCC" || true + [ "`which clang++ 2>/dev/null`" ] && create_bm "clang++" "CLANG" || true + for v in `seq 9 -1 3` 1 0; do + [ "`which g++-4.$v 2>/dev/null`" ] && create_bm "g++-4.$v" "GCC4.$v" || true + done + [ "`ls /usr/share/upp/*.bm`" ] || create_bm "g++" "GCC" + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + rm -f /usr/share/upp/*.bm + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/uppbox/lpbuild2/debian/umk.prerm b/uppbox/lpbuild2/debian/umk.prerm new file mode 100644 index 000000000..58eec6d7a --- /dev/null +++ b/uppbox/lpbuild2/debian/umk.prerm @@ -0,0 +1,39 @@ +#!/bin/sh +# prerm script for upp +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + rm -f /usr/share/upp/*.bm + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/uppbox/lpbuild2/debian/upp.install b/uppbox/lpbuild2/debian/upp.install new file mode 100644 index 000000000..d9be6b119 --- /dev/null +++ b/uppbox/lpbuild2/debian/upp.install @@ -0,0 +1,2 @@ +uppsrc usr/share/upp/uppsrc +copyright usr/share/doc/upp diff --git a/uppbox/lpbuild2/debian/watch b/uppbox/lpbuild2/debian/watch new file mode 100644 index 000000000..7624e1519 --- /dev/null +++ b/uppbox/lpbuild2/debian/watch @@ -0,0 +1,7 @@ +version=3 + +# nightly builds +http://code.google.com/p/upp-mirror/downloads/list?can=1 .*/upp-x11-src-(.*)\.tar\.gz + +# stable release +#http://sf.net/upp/upp-x11-src-(.*)\.tar\.gz diff --git a/uppbox/lpbuild2/dput.cfg b/uppbox/lpbuild2/dput.cfg new file mode 100644 index 000000000..bcc1c8360 --- /dev/null +++ b/uppbox/lpbuild2/dput.cfg @@ -0,0 +1,34 @@ +[upp-oneiric] +fqdn = ppa.launchpad.net +method = ftp +incoming = ~dolik-rce/uppnightly/ubuntu/oneiric +login = anonymous +allow_unsigned_uploads = 0 + +[upp-natty] +fqdn = ppa.launchpad.net +method = ftp +incoming = ~dolik-rce/uppnightly/ubuntu/natty +login = anonymous +allow_unsigned_uploads = 0 + +[upp-maverick] +fqdn = ppa.launchpad.net +method = ftp +incoming = ~dolik-rce/uppnightly/ubuntu/maverick +login = anonymous +allow_unsigned_uploads = 0 + +[upp-lucid] +fqdn = ppa.launchpad.net +method = ftp +incoming = ~dolik-rce/uppnightly/ubuntu/lucid +login = anonymous +allow_unsigned_uploads = 0 + +[upp-karmic] +fqdn = ppa.launchpad.net +method = ftp +incoming = ~dolik-rce/uppnightly/ubuntu/karmic +login = anonymous +allow_unsigned_uploads = 0 diff --git a/uppbox/lpbuild2/lpbuild.sh b/uppbox/lpbuild2/lpbuild.sh new file mode 100755 index 000000000..34e7f3d70 --- /dev/null +++ b/uppbox/lpbuild2/lpbuild.sh @@ -0,0 +1,67 @@ +#!/bin/sh + +# PRODUCTION CONFIGURATION +GPG_PROG="/home/upp/bin/gpg-extpass" # what program to use for signing (here a wrapper that supplies passphrase) +GPG_KEY="0CE4194D" # gpg key fingerprint to use +TMP="~/upp.tmp" # path for temporary files +SRCDIR="~/upp.tmp/u" # where to look for source tarball + +## DEBUG CONFIGURATION +#GPG_PROG="/usr/bin/gpg-extpass" +#GPG_KEY="13A907FC" +#TMP="/tmp/upp" +#SRCDIR="/home/h" +set -e + +version="$(ls $SRC/upp-x11-src-*.tar.gz | sed '$s/.*upp-x11-src-\([0-9]*\)[.]tar[.]gz/\1/')" +tmp="$TMP/upp-$version" + +if [ ! "$version" ]; then + echo "Source tarball not found in $SRC!" + exit 1 +elif [ -d "$tmp" ]; then + echo "Version $version was already built once!" + echo " (If you are trying to build it again on purpose," + echo " delete directory '$tmp' manually)" + exit 1 +fi + +dists="karmic lucid maverick natty oneiric" +scriptpath="$(cd ${0%/*} 2>/dev/null || true; echo $PWD/${0##*/})" +scriptdir="$(dirname $scriptpath)" +src="$SRCDIR/upp-x11-src-$version.tar.gz" + +rm -rf "$TMP" +mkdir -p "$tmp" + +cp -r "$scriptdir/debian" "$tmp/debian" +for f in Makefile mkfile copyright theide.1 theide.desktop; do + cp "$scriptdir/$f" "$tmp/$f" +done +[ "$1" = "stable" ] && sed -i '/code.google/s/^/#/;/sf.net/s/^#//;' "$tmp/debian/watch" +ln -s "$src" "$TMP/upp_$version.orig.tar.gz" + +cd $tmp +tar -xzf "$TMP/upp_$version.orig.tar.gz" +mv "$tmp/upp-x11-src-$version"/{bazaar,examples,reference,tutorial,uppsrc} "$tmp/" +rm -r "$tmp/upp-x11-src-$version" + +set +e +for dist in $dists; do + distver=$version-0~$dist"0" + + cat > "debian/changelog" << EOF +upp ($distver) $dist; urgency=low + + * Updated to SVN version $version + * See http://www.ultimatepp.org/redmine/projects/upp/repository for complete + and detailed list of changes. + + -- Jan Dolinar `date -R` +EOF + + [ "$skiporig" ] || dpkg-source --commit . packaging packaging.patch + dpkg-buildpackage -d -S -k$GPG_KEY -m'Jan Dolinar ' -sgpg -p$GPG_PROG $skiporig + dput -c "$scriptdir/dput.cfg" "upp-$dist" "../upp_"$distver"_source.changes" + skiporig="-sd" +done diff --git a/uppbox/lpbuild2/mkfile b/uppbox/lpbuild2/mkfile new file mode 100755 index 000000000..5f951212b --- /dev/null +++ b/uppbox/lpbuild2/mkfile @@ -0,0 +1,576 @@ +######################################################################## +# __ __ __ ____ __ __ __ __ ____ ___ _ _ # +# ( )( )( ) (_ _)( )( \/ ) ( )(_ _)( _) _( )_ _( )_ # +# )(__)( )(__ )( )( ) ( /__\ )( ) _) (_ _)(_ _) # +# \____/ (____)(__) (__)(_/\/\_)(_)(_)(__) (___) (_) (_) # +# ___ ___ __ __ __ ___ _ _ __ ___ _ _ # +# ( _)( ,) ( ) ( \/ )( _)( \/\/ )/ \ ( ,) ( )/ ) # +# ) _) ) \ /__\ ) ( ) _) \ /( () ) ) \ ) \ # +# (_) (_)\_)(_)(_)(_/\/\_)(___) \/\/ \__/ (_)\_)(_)\_) # +# __ __ __ _ _ ___ ___ __ __ ___ # +# ( \/ ) ( ) ( )/ )( _)( _)( )( ) ( _) # +# ) ( /__\ ) \ ) _) ) _) )( )(__ ) _) # +# (_/\/\_)(_)(_)(_)\_)(___)(_) (__)(____)(___) # +# # +######################################################################## + +############################## USAGE ################################### +# This makefile is controlled through a set of variables, similar to # +# any other makefile. The prefered way to change them is via command # +# line, e.g.: make "PKG=ide usvn" CC=g++ # +# # +# All of the variables that can control the bahaviour are listed below # +# in DEFAULTS section. Also their default value is shown here. # +# # +# For boolean type of variables, values of y, Y, yes, YES, Yes, true, # +# True, TRUE, T, t, 1, on, On, ON and @ are considered true. Anything # +# else is evaluated as false. # +############################# TARGETS ################################## +# This makefile defines four targets that are meant to be used by user # +# from the command line: # +# # +# all - builds all (default if any packages are selected) # +# help - shows this help (default if no packages are selected) # +# clean - deletes OBJDIR # +# export - exports preparsed Makefile to file EXPORT # +############################# EXAMPLES ################################# +# Typical usage: # +# make PKG=ide FLAGS="GUI MT" # +# More complicated usage: # +# make PKG="ide UWord Bombs" FLAGS="GUI GCC NOGTK" VERBOSE=y # +# Building "theide" instead of "ide": # +# make PKG=ide BINPREFIX=bin/the # +# Export makefile with full dependencies: # +# make export PKG=ide FAST=n # +# Show help: # +# make OR make help # +# Simulation mode: # +# make PKG=ide SIMULATE=y # +# Silent mode: # +# make PKG=ide SILENT=y # +# Paralel compilation (3 paralel processes): # +# make PKG=ide JOBS=3 # +############################# DEFAULTS ################################# +# List of packages to build (space separated). # +# If empty, this help text will be shown. # +PKG= +# Paths where to look for packages. # +NESTS=bazaar examples reference tutorial uppsrc +# Flags as in TheIDE. +# The only difference is, that if you use SPEED or SIZE flag, then # +# the application will be optimized for Speed or Size, respectively. # +# Flags STATIC and ALLSHARED will determine the linking mode. # +FLAGS=GCC +# Additional include paths for compiler (without leading "-I"). # +INCPATHS:= +# Paths to libraries for linker. # +LIBPATHS:= +# Directory to store intermediate object files # +OBJDIR:= _out +# Extension added to resulting executables # +BINEXT:= +# Prefix for resulting binaries. Usually used with "/" at the end, # +# to specify the directory (hence the name) # +BINPREFIX:=bin/ +# ar command # +AR:= ar -src +# C compiler command # +CC:= c++ +# C++ compiler command # +CXX:=$(CC) +# Options for C compiler # +CFLAGS:= +# Options for C++ compiler # +CXXFLAGS:= +# Options for linker # +LDFLAGS:=-Wl,--gc-sections -Wl,-s -Wl,-O,2 +# Additional options for speed optimization # +SPEEDFLAGS:=-O3 -ffunction-sections -fdata-sections +# Additional options for size optimization # +SIZEFLAGS:=-Os -finline-limit=20 -ffunction-sections -fdata-sections +# Platform flag, added to FLAGS # +PLATFORM:=$(shell uname | tr a-z A-Z) POSIX +# Suppress all messagges # +SILENT:= +# Print each executed command # +VERBOSE:= +# Print each executed command, prepended with "SIMULATE: ", without # +# actually executing it. # +SIMULATE:= +# Do not make full dependency scan (using gcc -M switch). # +# This saves a lot of time and usually doesn't make any harm. # +# FAST mode must by turned on only if you modified include files (*.h, # +# *.lay, ...) without modifying the *.c/cpp files that include them. # +FAST:=y +# Add flags from based on mainconfig section (not implemented yet) # +USEMAINCFG:= +# Number of parallel jobs to use (like "make -jN" option). # +# The JOBS variable must be used instead of -j option (as -j would not # +# work as expected). Default value is the number of cores (if it is # +# possible to detect) or 1. # +JOBS:=$(shell echo /sys/devices/system/cpu/cpu[0-9] | wc -w || echo 1) +# External parser to use instead of the contained one. Also used # +# for manipulation with the internal parser (see update-parser, # +# and export-parser targets in this Makefile for details). # +PARSER:= +# Exported makefile (used only with export target) # +# If multiple packages are being exported, each produces additional # +# Makefile, which name is EXPORT.package_name # +EXPORT:=Makefile.export +# Awk binary. Used only for export. # +AWK:=awk +######################################################################## +# HELP END + +ifeq ($(filter 3.8%, $(MAKE_VERSION)), ) +$(error This Makefile only supports GNU make version 3.80 and newer) +endif + +# no need to parse dependencies just to clean up or to read help etc. +ifeq ($(MAKECMDGOALS),clean) +skip-parse:=y +endif +ifeq ($(MAKECMDGOALS),help) +skip-parse:=y +endif +ifeq ($(MAKECMDGOALS),export) +skip-parse:=y +endif +ifeq ($(PKG),) +skip-parse:=y +endif + +# Determine the name of this Makefile +filename:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) + +# Helper functions to put variables on cmdline +pass-var= "$1=$$($1)" +export-var= "$1=$($1)" +# list of user variables to pass to child processes +cmdline-vars=NESTS FLAGS INCPATHS LIBPATHS OBJDIR BINEXT BINPREFIX AR CC CXX\ + CFLAGS CXXFLAGS LDFLAGS SPEEDFLAGS SIZEFLAGS PLATFORM\ + SILENT VERBOSE SIMULATE FAST USEMAINCFG +L:=( +R:=) +CONFIRM=y Y yes YES Yes true True T TRUE t 1 on On ON @ +confirm=$(filter $(strip $1),$(CONFIRM)) +# verbose/silent/fast mode switches +S:=$(call confirm,$(SILENT)) +M:=$(if $(call confirm,$(VERBOSE)),,@) +M:=$(if $(call confirm,$(SIMULATE)),@echo SIMULATE: ,$M) +F:=$(call confirm,$(FAST)) +# echo a string if silent mode is not on +echo=$(if $S,,@echo $1) + +ifneq ($(skip-parse),y) + +flags:=$(sort $(FLAGS) $(PLATFORM)) +CINC:=$(foreach d,$(NESTS) $(INCPATHS), -I$d) -I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/local/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/local/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/local/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include/gtk-2.0 -I/usr/X11R6/include/glib-2.0 -I/usr/X11R6/lib/glib-2.0/include -I/usr/X11R6/lib/gtk-2.0/include -I/usr/X11R6/include/cairo -I/usr/X11R6/include/pango-1.0 -I/usr/X11R6/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include/atk-1.0 -I/usr/local/include -I/usr/local/include/libpng -I/usr/include/gdk-pixbuf-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gtk-3.0/gdk +LIBPATH:=$(foreach d,$(LIBPATHS), -L$d) -L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib +needed-dirs:= +begin-group:=-Wl,--start-group +end-group:=-Wl,--end-group +# MacOsX specific things +ifeq ($(filter $(PLATFORM),DARWIN),DARWIN) +begin-group:= +end-group:= +endif +# Return true, if package $2 is to be compiled with flag $1 +has-flag=$(filter $1,$2) +#Join array with "_" +concatenate=$(strip $(if $1,$(if $(filter $(words $1),1),$1,\ + $(firstword $1)_$(call concatenate,$(wordlist 2,$(words $1),$1))))) +# Return output directory for .o files, based on pkg name and flags +objdir=$(OBJDIR)/$1/$(call concatenate,$($1_FLAGS)) +# prepare output directories targets +define create-dir +needed-dirs+= $1 +$1: + $(call echo," Creating directory $1 ...") + $Mmkdir -p $1 +endef +needs-dir=$(if $(filter $(needed-dirs),$1),,$(eval $(call create-dir,$1))) $1 +# get dependencies recursively +get-deps=$(strip $(foreach p,$($1_USES),$(call get-deps,$p)) $1) + +# Compiler commands +compiler-cpp=$(CXX) -c -x c++ $(CXXFLAGS) +compiler-c=$(CC) -c -x c $(CFLAGS) +analyze-info=$(if $S,, Analyzing $1 dependencies ...) +includes-fetcher-c=$(info $(analyze-info))$(CC) -M -x c $(CXXFLAGS) +includes-fetcher-cpp=$(info $(analyze-info))$(CC) -M -x c++ $(CFLAGS) + +# file counting utilities for progress reports +C:=$(OBJDIR)/.make_counter +incrementor:=while ! ln -s -T '$C' '$C_lock' 2>/dev/null;do true; done; echo -n $$$$(($$$$(cat '$C')+1))>'$C';cat '$C'; rm $C_lock; +counter-beg:=c=0; for f in +counter-end:=; do [ -e $$f ] && c=$$(($$c+1)); done; echo $$c; + +# general target scheme (args:{deps,target,pkg,lang,flags} +define compile +$2: $(if $F,$($3_NEST)/$1,$(dir $2)$(shell $(includes-fetcher-$4) $5 $(CINC) $($3_MACRO) $($3_NEST)/$1 |tr -d '\\\\' | sed 's/^[^:]*://')) | $(call needs-dir,$(dir $2)) + $(call echo," Compiling $1 $Lflags $(strip $($3_FLAGS))$R ["`$(incrementor)`"/$(file-num)] ...") + $M$(compiler-$4) $5 $(CINC) $($3_MACRO) $($3_NEST)/$1 -o $2 +$(EMPTYLINE) +endef + +#compile .cpp/.c/.icpp into .o/.io +compile-cpp=$(call compile,$1,$2,$3,cpp,) +compile-c=$(call compile,$1,$2,$3,c,) +compile-icpp=$(call compile,$1,$2,$3,cpp,) +# ditto with speed optimization +compile-cpp-speed=$(call compile,$1,$2,$3,cpp,$(SPEEDFLAGS)) +compile-c-speed=$(call compile,$1,$2,$3,c,$(SPEEDFLAGS)) +compile-icpp-speed=$(call compile,$1,$2,$3,cpp,$(SPEEDFLAGS)) +# ditto with size optimization +compile-cpp-size=$(call compile,$1,$2,$3,cpp,$(SIZEFLAGS)) +compile-c-size=$(call compile,$1,$2,$3,c,$(SIZEFLAGS)) +compile-icpp-size=$(call compile,$1,$2,$3,cpp,$(SIZEFLAGS)) + +# call appropriate compile functions for all files +define compile-all +$(if $(call has-flag,SPEED,$($1_FLAGS)),\ + $(foreach f,$($1_FILES_CPP) $($1_FILES_CPP_SPEED) $($1_FILES_CPP_SIZE),$(call compile-cpp-speed,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_C) $($1_FILES_C_SPEED) $($1_FILES_C_SIZE),$(call compile-c-speed,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_ICPP) $($1_FILES_ICPP_SPEED) $($1_FILES_ICPP_SIZE),$(call compile-icpp-speed,$1/$f,$($1_OBJDIR)/$(basename $f).io,$1))\ +,$(if $(call has-flag,SIZE,$($1_FLAGS)),\ + $(foreach f,$($1_FILES_CPP) $($1_FILES_CPP_SPEED) $($1_FILES_CPP_SIZE),$(call compile-cpp-size,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_C) $($1_FILES_C_SPEED) $($1_FILES_C_SIZE),$(call compile-c-size,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_ICPP) $($1_FILES_ICPP_SPEED) $($1_FILES_ICPP_SIZE),$(call compile-icpp-size,$1/$f,$($1_OBJDIR)/$(basename $f).io,$1))\ +,\ + $(foreach f,$($1_FILES_CPP),$(call compile-cpp,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_C),$(call compile-c,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_ICPP),$(call compile-icpp,$1/$f,$($1_OBJDIR)/$(basename $f).io,$1))\ + $(foreach f,$($1_FILES_CPP_SPEED),$(call compile-cpp-speed,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_C_SPEED),$(call compile-c-speed,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_ICPP_SPEED),$(call compile-icpp-speed,$1/$f,$($1_OBJDIR)/$(basename $f).io,$1))\ + $(foreach f,$($1_FILES_CPP_SIZE),$(call compile-cpp-size,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_C_SIZE),$(call compile-c-size,$1/$f,$($1_OBJDIR)/$(basename $f).o,$1))\ + $(foreach f,$($1_FILES_ICPP_SIZE),$(call compile-icpp-size,$1/$f,$($1_OBJDIR)/$(basename $f).io,$1))\ +)) +endef + +ifeq ($(single-package),y) + +# prepare some variables neccesary early in the build process +define prep + $(eval $1_FLAGS:=$(sort $($1_FLAGS) $(if $($1_SPEED),SPEED,$(if $($1_SIZE),SIZE,)))) + $1_MACRO:=$(foreach f,$($1_FLAGS), -Dflag$f) + $1_OBJDIR:=$(call objdir,$1) +endef + +# compile all .c/cpp files in package $1 and create .a +define build +$(eval $1_OBJFILES:=$(foreach f,$($1_FILES_CPP) $($1_FILES_CPP_SPEED) $($1_FILES_CPP_SIZE) $($1_FILES_C) $($1_FILES_C_SPEED) $($1_FILES_C_SIZE),$($1_OBJDIR)/$(basename $f).o)) +$(eval $1_IOBJFILES:=$(foreach f,$($1_FILES_ICPP) $($1_FILES_ICPP_SPEED) $($1_FILES_ICPP_SIZE),$($1_OBJDIR)/$(basename $f).io)) + +$($1_OBJDIR)/$(notdir $1.a): $($1_OBJFILES) + $(call echo," Creating archive $$@ ...") + $M$(AR) $$@ $($1_OBJFILES) + +$(eval $(call compile-all,$1)) +endef + +# create target to link libraries into executable +define link +$(eval ARCHIVES:=$(strip $(foreach u,$(ALLDEPS),$($u_IOBJFILES)) $(foreach u,$(ALLDEPS_),$($u_OBJDIR)/$(notdir $u.a)))) +$(eval ALLLIBS:=$(sort $(foreach u,$(ALLDEPS_),$(foreach l,$($u_LIBS), -l$l)))) +$(shell mkdir -p $(OBJDIR);rm -f $C_lock; echo -n `$(counter-beg) $(sort $(IOBJFILES) $(foreach u,$(ALLDEPS),$($u_OBJFILES))) $(counter-end)` > '$C') + +$(BINPREFIX)$1$(BINEXT): $(ARCHIVES) $(call needs-dir,$(dir $(BINPREFIX))) + $(call echo," Linking $$@ ...") + $M$(CXX) -o $$@ $(if $(call has-flag,ALLSHARED,$($1_FLAGS)),-shared,$(if $(call has-flag,STATIC,$1),-static,)) $(LIBPATH) $(LDFLAGS) $(begin-group) $(ARCHIVES) $(ALLLIBS) $(end-group) +endef + +endif # single-package + +# call make to parse, compile and build package $1 +define make-pkg +.PHONY: $1 +$1: + $(if $(call confirm,$(SIMULATE)),@echo -n "SIMULATE: ";,) + $(if $(call confirm,$(SIMULATE)),,$M)+-\ + $(MAKE) -Rrf $(filename) $(if $(JOBS),-j$(JOBS) ,)--no-p PKG=$1 single-package=y $(foreach v,$(cmdline-vars),$(call pass-var,$v)) +endef + +.PHONY: default +default: all + +# create targets for the main tasks +define main-targets +.PHONY: all start export + +all: $(if $(single-package),start $(BINPREFIX)$(PKG)$(BINEXT),$(PKG)) + $(call echo,"$(if $(single-package), Package $(PKG),Everything) done.") + +start: + $(call echo," Building package $(PKG)$(if $($(PKG)_DESC), [$($(PKG)_DESC)],) ($(file-num) files in $(words $(ALLDEPS)) packages, flags: $($(PKG)_FLAGS))") +endef + +endif # if skip-parse + +# create target to export makefile for package $1 +define export-pkg +export_$1: + $(if $(call confirm,$(SIMULATE)),@echo -n "SIMULATE: ";,) + $(if $(call confirm,$(SIMULATE)),,$M)+-\ + $(MAKE) -rRf $(filename) --no-p single-package=y "EXPORT=$(EXPORT).$(subst /,_,$1)" PKG=$1 $(foreach v,$(cmdline-vars),$(call pass-var,$v)) export +endef + +# create targets for help, clean up, export and developper targets +define additional-targets +.PHONY: help clean +help: + @sed '/HELP.END/{s/.*//;q;}' $(filename) + +clean: + $(call echo,Deleting $(OBJDIR)) + $M rm -rf $(OBJDIR) || true + +#For developers: +# print the parser to stdout (usage: make export-parser) +print-parser: + @sed -n 's/^#://p;' $(filename) + +# print the parser to PARSER (usage: make export-parser PARSER=parser.sh) +export-parser: + @sed -n 's/^#://p;' $(filename) > $(PARSER) + +# load $(PARSER) into this Makefile (usage: make update-parser PARSER=parser.new > Makefile.new) +update-parser: + @sed -n '/^#:/!s/.*/&/p;' $(filename) + @sed 's/.*/#:&/;' $(PARSER) + +endef + +#create export target +ifeq ($(words $(strip $(PKG))),1) +define export-targets +export: + $(call echo," Exporting makefile for package $(PKG) to $(EXPORT) ...") + $Mecho ".PHONY:default" > $(EXPORT) + $Mecho "default: all" >> $(EXPORT) + $M$(MAKE) -RrpqBf $(filename) default "PKG=$(PKG)" single-package=y exporting=y $(foreach v,$(cmdline-vars),$(call export-var,$v)) \ + |sed -n '/^. Files/,$$$${/^[\x23]/!{/.c[p]*:$$$$/!H}};$$$${g;p;}'\ + >> '$(EXPORT)' +# |sed -n '/^. Files/,$$$${/^[\x23]/!{/:$$$$/!H}};$$$${g;p;}'\ + +endef +else +define export-targets +export: $(foreach p,$(PKG),$(eval $(call export-pkg,$p)) export_$p) + $(call echo,"Exporting control makefile to $(EXPORT)") + $Mecho -n all:>'$(EXPORT)' + $Mecho -n "$(foreach p,$(PKG),\n $M+-$(MAKE) --no-p -f $(EXPORT).$(subst /,_,$p);)">>'$(EXPORT)' +endef +endif + +# clean-out the default rules SUFFIXES, we manage everything based on upp files +.SUFFIXES: + +ifneq ($(skip-parse),y) + +ifeq ($(single-package),y) + +# Parse the upp files +JOBS:=$(strip $(JOBS)) +ifeq ($(JOBS),1) +$(if $S,,$(info Using 1 parallel job ...)) +else +$(if $S,,$(info Using $(JOBS) parallel jobs ...)) +endif +$(if $S,,$(info Parsing package files needed for $(PKG) ...)) +ifeq ($(PARSER),) +$(eval $(shell sed -n 's/^#://p;' $(filename) | sh -s '$(PKG)' '$(NESTS)' '$(flags)')) +else +$(eval $(shell sh $(PARSER) '$(PKG)' '$(NESTS)' '$(flags)')) +endif +$(eval $(PKG)_FLAGS+=MAIN) +$(eval ALLDEPS_:=$(call get-deps,$(PKG))) +$(eval ALLDEPS:=$(sort $(ALLDEPS_))) +$(eval file-num:=$(words $(foreach p,$(ALLDEPS),$($p_FILES_CPP) $($p_FILES_ICPP) $($p_FILES_C) $($p_FILES_CPP_SPEED) $($p_FILES_ICPP_SPEED) $($p_FILES_C_SPEED) $($p_FILES_CPP_SIZE) $($p_FILES_ICPP_SIZE) $($p_FILES_C_SIZE)))) +$(foreach p,$(ALLDEPS),$(eval $(call prep,$p))) + +endif # single-package + +# Call link on main package and create all directories +# and build targets needed for current task +# OR +# run makefile for each package from $(PKG) +$(if $(single-package),\ + $(foreach p,$(ALLDEPS),$(eval $(call build,$p)))\ + $(eval $(call link,$(PKG))),\ + $(foreach p,$(PKG),$(eval $(call make-pkg,$p)))) + +endif # not skip-parse + +$(eval $(main-targets)) +ifneq ($(exporting),y) +$(eval $(additional-targets)) +$(eval $(export-targets)) +endif + +# Everything marked with '#:' is a shell script used to parse .upp files +#:NESTS="$2" +#:FLAGS="$3" +#: +#:# GENERAL FUNCTIONS +#:FindUpp(){ +#: pkg=`/bin/echo "$1" | sed -e 's|.*/||;'` +#: for n in $NESTS +#: do +#: if [ -f "$n/$1/$pkg.upp" ] +#: then +#: FILE="$n/$1/$pkg.upp" +#: NEST="$n" +#: return +#: fi +#: done +#:} +#:PrintFiles() { +#: local files="$1" +#: shift +#: local s +#: while [ "x" != "x$1" ] +#: do +#: s=$s"/[.]"$2"\$/ {s/[.]"$2"\$/."$3"/;s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval "$PKG"_"$1"+=&)|p;};" +#: shift 3 +#: done +#: /bin/echo "$files" | sed -n -e "$s" +#:} +#:Pop(){ +#: /bin/echo "$1" +#:} +#:Shift(){ +#: shift +#: /bin/echo "$@" +#:} +#: +#:# SED PARSERS +#:# WARNING: Don't try to fix the ugly looking syntax of sed scripts - it is +#:# neccesary to make it work with BSD sed! +#:# +#:# Parser for booleans +#:p="/^description/! {" +#:# change (..(..)..) to (..[..]..) +#:p=$p" +#::a; +#:s/(\(.*\)(\([^()]*\))\(.*\))/(\1[\2]\3)/ +#:t a; +#:" +#:# change (...) to ([...]) +#:p=$p"s/(\(.*\))/([\1])/g;" +#:# delete spaces on left ... +#:p=$p":b; +#:s/\[\([^ ]*\)[ ][ ]*\([&|]\)\(.*\)\]/[\1\2\3]/;" +#:# ... and right side of operator +#:p=$p"s/\[\([^ ]*\)\([&|]\)[ ][ ]*\(.*\)\]/[\1\2\3]/; +#:t b; +#:" +#:# insert implicit & +#:p=$p":c; +#:s/\[\([a-zA-Z0-9_!&|]*\)[ ][ ]*\(.*\)\]/[\1\&\2]/; +#:t c; +#:" +#:# place {} around flags +#:p=$p"s/\([![&|]\)\([a-zA-Z0-9_][a-zA-Z0-9_]*\)/\1{\2}/g;" +#:# evalualte flags +#:p=$p"s/{\([^{}]*\)}/{\$(call has-flag,\1,$FLAGS)}/g;" +#:# evaluate negations +#:p=$p":d; +#:s/!{\([^{}]*\)}/{\$(if \1,,T)}/g;" +#:# evaluate ANDs +#:p=$p"s/{\([^{}]*\)}&{\([^{}]*\)}/{\$(call and,\1,\2)}/g;" +#:# evaluate ORs +#:p=$p"s/{\([^{}]*\)}|{\([^{}]*\)}/{\$(call or,\1,\2)}/g;" +#:# remove [] around already evaluated statements +#:p=$p"s/\[\({[^{}]*}\)\]/\1/g; +#:t d; +#:" +#:p=$p"s/({\([^{}]*\)})\(.*\)/\$(if \1,\2,)/g; +#:}" +#: +#:# File list parser +#:# strip quotes +#:f="s/\"//g;" +#:# remove separators +#:f=$f"s/,[ ]*[^,]*separator[ ]*,/,/g;" +#:# file.cpp optimize_xyz -> file.cpp_xyz +#:f=$f"s/,[ ]*\([^ ,]*\)[ ]*optimize_/,\1_/g;" +#:# drop modificators (charset, readonly, highlight, tabsize, font, ...) +#:f=$f"s/,[ ]*\([^ ,][^ ,]*\)[^,]*/,\1/g;" +#:# convert \ -> / and print +#:f=$f's/\\/\//g;p;' +#: +#:# Simple sections parser +#:# note: charset and blitz are ignored +#:Simples() { +#: /bin/echo "$2" | sed -n -e ' +#: /^library[ ]*/ {s/^library[ ]*//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval $1"_"LIBS+=&)|;p;};"' +#: /^link[ ]*/ {s/^link[ ]*//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval $1"_"LINK+=&)|;p;};"' +#: /^acceptflags[ ]*/ {s/^acceptflags[ ]*//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval $1"_"ACCEPT+=&)|;p;};"' +#: /^mainconfig[ ]*/ {s/^mainconfig[ ]*//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval $1"_"CFG+=&)|;p;};"' +#: /^target[ ]*/ {s/^target[ ]*//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval $1"_"TARGET+=&)|;p;};"' +#: /^include[ ]*/ {s/^include[ ]*//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval $1"_"INC+=&)|;p;};"' +#: /^options[ ]*/ {s/^options[ ]*//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval $1"_"OPTS+=&)|;p;};"' +#: /^flags[ ]*/ {s/^flags[ ]*//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval $1"_"FLAGS+=&)|;p;};" +#:} +#: +#:# THE MAIN PARSER FUNCTION +#:Parse(){ +#: PKG="$1" +#: FindUpp "$PKG" +#: /bin/echo '$(eval '$package'_NEST:='$NEST')' +#: /bin/echo '$(eval '$package'_FLAGS+='$FLAGS')' +#: +#: if [ -z "$FILE" ] +#: then +#: /bin/echo "ERROR: Package $PKG not found!" +#: exit 1 +#: fi +#: # get the .upp contents, parse the boolean expresions and translate them to the language of make +#: UPP=`cat $FILE | tr "\n\r;" " \n" | sed -e "s/^[ ]*//g;s/[ ]*\$//g;s/[ ][ ]*/ /g; $p"` +#:# FILE SECTION PARSER +#: FILES=`/bin/echo "$UPP" | sed -n -e '/^'file'[ ]*/ {s/^'file'[ ]*//;s/.*/, & ,/;'"$f}" | tr "," "\n";` +#: PrintFiles "$FILES" \ +#: FILES_CPP cpp cpp \ +#: FILES_CPP_SPEED cpp_speed cpp \ +#: FILES_CPP_SIZE cpp_size cpp \ +#: FILES_ICPP icpp icpp \ +#: FILES_ICPP_SPEED icpp_speed icpp \ +#: FILES_ICPP_SIZE icpp_size icpp \ +#: FILES_C c c \ +#: FILES_C_SPEED c_speed c \ +#: FILES_C_SIZE c_size c +#:# DESCRIPTION SECTION PARSER +#: /bin/echo "$UPP" | sed -n -e '/^'description'[ ]*/{s/^'description'[ ]*//;s/^"\(.*\)"$/\1/;s/\\[^ ]*$//;'"s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval "$PKG"_DESC=&)|p;}" +#:# USES SECTION PARSER +#: USES=$( /bin/echo "$UPP" | sed -n -e '/^'uses'[ ]*/{s/^'uses'[ ]*//;s/\\/\//g;/^\$/!s/[ ]*,[ ]*/ /g;p;}' ) +#: /bin/echo "$USES" | sed -e "s|\"||g;s|^[ ]*||g;s|[ ]*\$||g;s|.*|\$(eval "$PKG"_USES+=&)|;" +#:# GLOBAL OPTIMIZATION FLAGS PARSER +#: /bin/echo "$UPP" | sed -n -e 's|^optimize_speed[ ]*|$(eval '"$PKG"'_SPEED=T)|p; +#: s|^optimize_size[ ]*|$(eval '"$PKG"'_SIZE=T)|p;' +#:# SIMPLE SECTIONS PARSERS +#: Simples "$PKG" "$UPP" +#:} +#: +#:# MAIN LOOP +#:NEEDED="$1" +#:PARSED="" +#:while [ -n "$NEEDED" ] +#:do +#: package=`Pop $NEEDED` +#: NEEDED=`Shift $NEEDED` +#: Parse $package; +#: PARSED="$PARSED $package" +#: uses=$( /bin/echo "$USES" | sed -e 's/\\/\//g;/^\$(/{s/.*, \([^, ]*\),[)]*$/\1/;}' ) +#: for dep in $uses +#: do +#: if [ -z "`/bin/echo " $NEEDED $PARSED " | grep " $dep "`" ] +#: then +#: NEEDED="$NEEDED $dep" +#: fi +#: done +#:done; +#:# +#:/bin/echo '$(eval PARSED:='"$PARSED"')' diff --git a/uppbox/lpbuild2/theide.1 b/uppbox/lpbuild2/theide.1 new file mode 100644 index 000000000..6e4226a79 --- /dev/null +++ b/uppbox/lpbuild2/theide.1 @@ -0,0 +1,180 @@ +.\" Process this file with command +.\" groff -man -Tascii theide.1 +.\" +.TH THEIDE 1 TheIDE " " TheIDE +.SH NAME +theide \(hy A good integrated development environment, +designed for developing large C++ applications. +.SH SYNOPSIS +.B theide +.br +.BI "theide " "assembly package" +.br +.BI "theide " "assembly package build_method" +.RB "[" \-options "] [" >FLAG [ ,FLAG ]...] +.RI [ out ] +.LP +The first method starts TheIDE with a Package selection dialog, +the second method directly opens +.IR package " from " assembly +and third one allows you to build or export specified project according +to the supplied parameters. The last method does not open TheIde +but causes it to work in console mode. +.SH DESCRIPTION +TheIDE +is U++ integrated development environment which introduces modular +concepts to C++ programming. It features +.I BLITZ-build +technology to speedup C++ rebuilds up to 4 times, visual designers +for U++ libraries, +.I Topic++ +system for documenting code and creating rich text +resources for applications (like help and code documentation) +and +.I Assist++ +\(hy a powerful C++ code analyzer that provides features +like code completion, navigation and transformation. + +TheIDE integrates with compiler and debugger +.RB "(by default " gcc "(1) and " gdb (1)) +and can also be used to develop non-U++ applications. + +.SH OPTIONS + +.IP assembly +Selects in which assembly to look for package. It must be configured +in file +.I ~/.upp/theide/assembly.var +. +.IP package +Selects which package to use. The package must exist in selected assembly. +.IP build_method +Selects build method. It must be configured in file +.I ~/.upp/theide/build_method.bm +. +.LP +.IP FLAGs +Specify witch flags should be set up. This works the same way as inside +TheIDE. The FLAGs must be separated by commas and first and prepended +with ">" character. Please note, that ">" has special meaning in most +shells and therefore you must either escape it or enclose in quotation +marks. +.LP +Parameter +.B options +must always form single string, e.g. "\-arvs". +Please note, that some options are mutually exclusive. Don't use them +together unless you want to be surprised by the results. +.SS General options: +.RS +.IP a +Rebuild all. Cleans caches before doing anything. +.IP b +Use BLITZ. +.IP e +If building fails, stop with message box. +.IP l +Be silent. +.IP v +Be verbose. +.IP m +Create a map file. +.RE +.SS Output mode: +.RS +.IP r +Release mode. +.IP 1 +Release mode \(hy optimize for size. +.IP 2 +Release mode \(hy optimize for speed. +.LP +These options are mutually exclusive. If more of them is used then last +one is used. If none is used, Debug mode is assumed. +.RE +.SS Linking mode: +.RS +.IP s +Use shared libraries. +.IP S +Use shared libraries and build as shared libraries. +.LP +These options are mutually exclusive. If more of them is used then last +one is used. If none is specified, static linking is used. +.RE +.SS Exporting: +.RS +.IP x +Export files necessary to build project to the directory +.I out +.IP X +Export all files in project to directory +.I out +.IP M +Create makefile in file +.I out +.IP xM,XM +If you mix M with x or X, Makefile is exported to directory +.I out +.LP +Options x and X are mutually exclusive. The last specified is used. +.RE +.SH FILES +.I ~/.upp/theide/*.var +.RS +The assembly specifications. +.RE +.I ~/.upp/theide/*.bm +.RS +The build methods configurations. +.RE +.I ~/.upp/theide/theide.cfg +.RS +Main configuration file. +.RE +.I ~/.upp/theide/ide.colors +.RS +Configuration of colors used in TheIDE. +.RE +.I ~/.upp/theide/ide.key +.RS +Configuration of key bindings in TheIDE. +.RE +.LP +.IP NOTE: +None of these files is meant to be edited by hand. They can be created +and/or modified from within TheIDE. This is strongly recommended +since it is easier and safer. +.SH EXAMPLES +.B "theide examples UWord" +.RS +Opens UWord (an example implementation of text proccesor) in TheIDE. +.RE +.LP +.B theide examples AddressBook GCC \-vasb ">GUI,MT" /tmp/ab +.RS +Builds application AddressBook with verbose output, using +.BR gcc (1) +in debug mode, with GUI and multithreading support, links it using +shared libraries and places it in /tmp/ab. +.RE +.LP +.B theide uppsrc ide \-2sx ">GUI,MT" /tmp/ide +.RS +Exports Makefile and all the files needed to build TheIDE itself +(with speed optimizations) into the directory /tmp/ide/. +.RE + +.SH BUGS +If you find any bugs, please contact the developpers on our forums ( +.I http://www.ultimatepp.org/forum +) or file a bug on projects SourceForge page ( +.I http://sourceforge.net/projects/upp +). +.SH AUTHORS +Mirek Fidler, Koldo Ramirez, Tomas Rylek, Daniel Kos +.SH DOCUMENTATION +Full documentation is accesible from within TheIDE +and also online on +.I http://ultimatepp.org +. diff --git a/uppbox/lpbuild2/theide.desktop b/uppbox/lpbuild2/theide.desktop new file mode 100644 index 000000000..930d225bf --- /dev/null +++ b/uppbox/lpbuild2/theide.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Name=TheIDE +GenericName=TheIDE +Comment=IDE for cross-platform C++ development +MimeType=application/x-upp; +Exec=theide +Icon=theide.png +Terminal=false +Type=Application +Categories=Development;IDE;GUIDesigner; +StartupNotify=false