summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-08-18 09:08:22 -0700
committerKeith Packard <keithp@keithp.com>2013-08-18 09:16:43 -0700
commit41acc56f76ff147669d4e4cdee61f8c6cdbf8931 (patch)
tree5113b4f309b47f0a5cac72e490ca9bccb18e863c
Build system for binutils-arm-none-eabi
Takes the binutils-source package and creates a package for the arm-none-eabi architecture Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat1
-rw-r--r--debian/control15
-rw-r--r--debian/copyright44
-rwxr-xr-xdebian/rules53
-rw-r--r--debian/source/format1
6 files changed, 119 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..ea0c183
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+binutils-arm-none-eabi (1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Keith Packard <keithp@keithp.com> Sun, 18 Aug 2013 02:49:03 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..1f0dd77
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,15 @@
+Source: binutils-arm-none-eabi
+Section: devel
+Priority: extra
+Maintainer: Keith Packard <keithp@keithp.com>
+Build-Depends: debhelper (>= 8.0.0),
+ binutils-source,
+ autotools-dev
+Standards-Version: 3.9.4
+
+Package: binutils-arm-none-eabi
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: GNU assembler, linker and binary utilities for ARM cortex -m0 and -m3 chips
+ Bare metal binutils for embedded ARM chips using the cortex-m0 and
+ cortex-m3 architecture
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..50efc00
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,44 @@
+This is the Debian GNU/Linux prepackaged version of the GNU assembler,
+linker, and binary utilities.
+
+This package was put together by me, James Troup <james@nocrew.org>,
+from sources, which I obtained from:
+
+ ftp://ftp.gnu.org/pub/gnu/binutils/
+
+and:
+
+ cvs://:pserver:anoncvs@sources.redhat.com:/cvs/src
+
+It was previously maintained by Christopher C. Chimelis <chris@debian.org>
+
+GNU Binutils is Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
+Foundation, Inc.
+
+ 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; either version 3 of the License, or
+ (at your option) any later version.
+
+ 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 Street - 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'
+and `/usr/share/common-licenses/LGPL'.
+
+The binutils manuals and associated documentation are also Copyright
+(C) Free Software Foundation, Inc. They are distributed under the GNU
+Free Documentation License Version 1.3 or any later version published
+by the Free Software Foundation, with no Invariant Sections, with no
+with no Front-Cover Texts, and with no Back-Cover Texts.
+On Debian GNU/Linux systems, the complete text of the GFDL can be found
+in `/usr/share/common-licenses/GFDL'.
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b2e4ef4
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,53 @@
+#!/usr/bin/make -f
+export DH_VERBOSE=1
+
+target=arm-none-eabi
+
+package=binutils-arm-none-eabi
+top_dir=$(shell pwd)
+binutils_dir=/usr/src/binutils
+stampdir=debian/stamp
+
+source_version := $(shell dpkg-query -W -f="\$${Version}\n" binutils-source)
+deb_version := $(source_version)+$(shell dpkg-parsechangelog | sed -ne "s/^Version: \(.*\)/\1/p")
+deb_upstream_version := $(shell echo $(deb_version) | cut -d- -f1)
+base_version := $(shell echo $(deb_version) | sed -e 's/\([1-9]\.[0-9]\).*-.*/\1/')
+
+upstream_dir=binutils-$(deb_upstream_version)
+
+unpack_stamp=$(stampdir)/unpack
+
+buildflags=$(shell dpkg-buildflags --export=configure)
+
+configure_flags = \
+ --target=$(target) \
+ --exec-prefix=\$${prefix}/lib \
+ --bindir=\$${prefix}/bin \
+ --infodir=\$${prefix}/share/doc/$(package)/info \
+ --htmldir=\$${prefix}/share/doc/$(package)/html \
+ --pdfdir=\$${prefix}/share/doc/$(package)/pdf \
+ --disable-nls \
+ --enable-plugins \
+ "--with-pkgversion=$(deb_version)" \
+ $(buildflags)
+
+%:
+ dh $@ -D$(upstream_dir) -Bbuild --with autotools-dev
+
+$(unpack_stamp):
+ tar xf $(binutils_dir)/binutils-*.tar.*
+ mkdir -p $(stampdir)
+ cp /usr/share/doc/binutils-source/copyright debian/copyright
+ touch $@
+
+override_dh_auto_configure: $(unpack_stamp)
+ dh_auto_configure -D$(upstream_dir) -Bbuild -- $(configure_flags)
+
+override_dh_gencontrol:
+ dh_gencontrol -a -- -v$(deb_version) -Vlocal:Version=$(deb_upstream_version) -Vbinutils:Version=$(source_version)
+
+override_dh_auto_clean:
+ rm -rf $(upstream_dir) build $(stampdir)
+
+override_dh_installchangelogs:
+ install -o 0 -g 0 -p -m644 debian/changelog debian/binutils-arm-none-eabi/usr/share/doc/binutils-arm-none-eabi/changelog.Debian
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)