initial checkin of gcc local package
authorKonrad Rosenbaum <konrad@silmor.de>
Sat, 14 Apr 2012 12:51:26 +0000 (14:51 +0200)
committerKonrad Rosenbaum <konrad@silmor.de>
Sat, 14 Apr 2012 12:51:26 +0000 (14:51 +0200)
gcc-local/Makefile [new file with mode: 0644]
gcc-local/build.sh [new file with mode: 0755]
gcc-local/configure [new file with mode: 0755]
gcc-local/debian/changelog [new file with mode: 0644]
gcc-local/debian/compat [new file with mode: 0644]
gcc-local/debian/control [new file with mode: 0644]
gcc-local/debian/copyright [new file with mode: 0644]
gcc-local/debian/docs [new file with mode: 0644]
gcc-local/debian/rules [new file with mode: 0755]
gcc-local/debian/source/format [new file with mode: 0644]
instr.txt [new file with mode: 0644]

diff --git a/gcc-local/Makefile b/gcc-local/Makefile
new file mode 100644 (file)
index 0000000..3e57f8c
--- /dev/null
@@ -0,0 +1,33 @@
+all: build
+
+CPUS=$(shell expr `cat /proc/cpuinfo |grep ^processor |tail -1|cut -f 2 -d :` + 1)
+JOPT=$(shell test $(CPUS) -gt 1 && expr $(CPUS) + 1 || echo $(CPUS))
+
+config:
+       ./configure
+
+build:
+       make -C gccbuild -j $(JOPT)
+
+install:
+       make -C gccbuild DESTDIR=`pwd`/debian/gcc-local install
+       mkdir -p debian/gcc-local-lib/usr/local/gcc/lib
+       mkdir -p debian/gcc-local-lib/etc/ld.so.conf.d
+       test -d debian/gcc-local/usr/local/gcc/lib64 && mkdir -p debian/gcc-local-lib/usr/local/gcc/lib64
+       -mv debian/gcc-local/usr/local/gcc/lib/lib*.so* debian/gcc-local-lib/usr/local/gcc/lib
+       -mv debian/gcc-local/usr/local/gcc/lib64/lib*.so* debian/gcc-local-lib/usr/local/gcc/lib64
+       echo '#part of gcc-local-lib package' >debian/gcc-local-lib/etc/ld.so.conf.d/gcc-local.conf
+       echo '/usr/local/gcc/lib' >>debian/gcc-local-lib/etc/ld.so.conf.d/gcc-local.conf
+       echo '/usr/local/gcc/lib64' >>debian/gcc-local-lib/etc/ld.so.conf.d/gcc-local.conf
+       mkdir -p debian/gcc-local/usr/local/bin
+       cd debian/gcc-local/usr/local/bin ; ln -sf ../gcc/bin/* .
+
+distclean clean:
+       -rm -rf gccbuild
+
+#distclean: clean
+
+
+%:
+       @echo "Making empty rule" $@
+       @echo 'Should I be worried?'
diff --git a/gcc-local/build.sh b/gcc-local/build.sh
new file mode 100755 (executable)
index 0000000..c044ee0
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+set -e
+
+test $# -lt 1 && { echo "Usage: $0 tarfile" ; exit 1 ; }
+
+opt=x
+
+#ends in gz?
+test $1 != ${1%.gz} && opt=xz
+test $1 != ${1%.bz2} && opt=xj
+
+tgt=`basename $1`
+tgt=${tgt%.tar*}
+
+ver=${tgt#gcc-}
+
+echo -n "Version number of GCC [$ver]: "
+read v2
+test x$v2 != x && ver=$v2
+
+#unpack
+echo "Deleting old directories"
+fakeroot debian/rules clean
+rm -rf source $tgt gccbuild
+echo "Unpacking GCC $ver from file $1 into $tgt ..."
+cat $1 | ( cd `dirname $0` ; tar $opt ; )
+
+#debian changelog
+cd `dirname $0`
+echo "Creating changelog"
+CL=debian/changelog
+echo 'gcc-local ('$ver') unstable; urgency=low' >$CL
+echo >>$CL
+echo '  * packaging upstream GCC' $ver >>$CL
+echo '  * wrapper package by konrad@silmor.de' >>$CL
+echo >>$CL
+lnam="`logname`"
+test "x$lnam" == x && lnam="`whoami`"
+rnam="$(grep ^`logname`: </etc/passwd | cut -f 5 -d : | cut -f 1 -d ,)"
+test "x$rnam" == x && rnam="$lnam"
+echo ' --' $rnam '<'$lnam'@'`hostname -f`'> ' `date --rfc-822` >>$CL
+
+#build
+echo "Calling debhelper to build..."
+ln -s $tgt source
+fakeroot debian/rules binary
+
diff --git a/gcc-local/configure b/gcc-local/configure
new file mode 100755 (executable)
index 0000000..8a99348
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+echo "Preparing GCC"
+cd `dirname $0`
+mkdir -p gccbuild || true
+cd gccbuild
+arch="`uname -m`-debian-linux-gnu"
+../source/configure --prefix=/usr/local/gcc --disable-multilib --enable-threads --enable-tls --enable-languages=c,c++ --enable-targets=$arch --disable-nls
diff --git a/gcc-local/debian/changelog b/gcc-local/debian/changelog
new file mode 100644 (file)
index 0000000..c9bdd49
--- /dev/null
@@ -0,0 +1,6 @@
+gcc-local (4.7.0) unstable; urgency=low
+
+  * packaging upstream GCC 4.7.0
+  * wrapper package by konrad@silmor.de
+
+ -- Konrad Rosenbaum <konrad@devant.mine>  Wed, 11 Apr 2012 09:05:14 +0200
diff --git a/gcc-local/debian/compat b/gcc-local/debian/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/gcc-local/debian/control b/gcc-local/debian/control
new file mode 100644 (file)
index 0000000..0a4c550
--- /dev/null
@@ -0,0 +1,32 @@
+Source: gcc-local
+Section: unknown
+Priority: extra
+Maintainer: Konrad Rosenbaum <konrad@devant.devant.lan.local>
+Build-Depends: debhelper (>= 7.0.50~)
+Standards-Version: 3.8.4
+Homepage: http://gcc.gnu.org
+
+Package: gcc-local
+Architecture: any
+Depends: gcc-local-lib ${shlibs:Depends}, ${misc:Depends}
+Description: Upstream GCC in /usr/local
+ This package provides the upstream GCC in /usr/local.
+ The GCC version provides may be newer or older than the one provided directly.
+ .
+ It does not interfere much with the distributions' GCC, since it is
+ installed in /usr/local - you can control which one you use by including or
+ excluding /usr/local/bin from your PATH variable.
+ .
+ Only C and C++ are provided, no localization of compiler messages (NLS) is
+ provided.
+ .
+ This package is geared towards users of the newest C++ features.
+
+Package: gcc-local-lib
+Architecture: any
+Description: libraries for gcc-local
+ This package contains the libraries that are needed by programs compiled
+ with gcc-local, e.g. libstdc++.
+ .
+ If you package programs compiled with gcc-local, make them depend on this
+ package to provide the necessary libraries.
diff --git a/gcc-local/debian/copyright b/gcc-local/debian/copyright
new file mode 100644 (file)
index 0000000..7cd15a7
--- /dev/null
@@ -0,0 +1,13 @@
+This work was packaged for Debian by:
+
+    Konrad Rosenbaum <konrad@silmor.de> on Tue, 10 Apr 2012 18:06:13 +0200
+
+It was downloaded from:
+
+    http://gcc.gnu.org
+
+Copyright:
+
+    GCC is under the GNU GPLv3, see man gpl
+
+This Debian packaging is public domain.
diff --git a/gcc-local/debian/docs b/gcc-local/debian/docs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/gcc-local/debian/rules b/gcc-local/debian/rules
new file mode 100755 (executable)
index 0000000..21895eb
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets  by Bill Allombert 2001
+
+all: clean binary
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+
+%:
+       dh $@ 
diff --git a/gcc-local/debian/source/format b/gcc-local/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/instr.txt b/instr.txt
new file mode 100644 (file)
index 0000000..d062a62
--- /dev/null
+++ b/instr.txt
@@ -0,0 +1,23 @@
+GCC config:
+../gcc-4.7.0/configure --prefix=/usr/local/gcc --disable-multilib --enable-threads --enable-tls --enable-languages=c,c++ --enable-targets=x86_64-debian-linux-gnu --disable-nls
+make
+make DESTDIR=`pwd`/debian/... install
+
+
+ lib: lib*/lib*.so* /etc/ld.so.conf.d/gcc-local.conf
+ main: rest
+
+
+
+
+
+
+
+
+Qt config:
+PATH=/usr/local/gcc/bin:$PATH
+CXXFLAGS=-stdg++0x (mkspecs/
+./configure -nomake demos -nomake examples -opensource -confirm-license
+
+ lib: lib/lib*.so* bin/assistant bin/qtconfig bin/qml* plugins translations imports
+ dev: lib/* include