summaryrefslogtreecommitdiff
authorMikhail Gusarov <dottedmag@dottedmag.net>2009-06-14 20:18:14 (GMT)
committer Mikhail Gusarov <dottedmag@dottedmag.net>2009-06-14 20:18:14 (GMT)
commitebdab463a365dc141deb44fb23a24c4012b45515 (patch)
tree74311f69eadaf85beebedcdd0ec5eb2dbf623d6e
First commitmaster
-rw-r--r--Makefile.am4
-rwxr-xr-xautogen.sh10
-rw-r--r--configure.ac8
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat1
-rw-r--r--debian/control21
-rw-r--r--debian/copyright16
-rwxr-xr-xdebian/rules121
-rw-r--r--hello.c26
9 files changed, 212 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..64157f9
--- a/dev/null
+++ b/Makefile.am
@@ -0,0 +1,4 @@
+bin_PROGRAMS = hello
+hello_SOURCES = hello.c
+
+AM_CFLAGS = -W -Wall -Werror
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..6a2318a
--- a/dev/null
+++ b/autogen.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+rm -rf autom4te.cache
+rm -f aclocal.m4 ltmain.sh
+
+echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1
+echo "Running autoconf..." ; autoconf || exit 1
+echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
+
+if [ -z "$NOCONFIGURE" ]; then ./configure "$@"; fi
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..ee9889a
--- a/dev/null
+++ b/configure.ac
@@ -0,0 +1,8 @@
+AC_PREREQ(2.60)
+AC_INIT(hello, 0.1, dottedmag@dottedmag.net)
+AM_INIT_AUTOMAKE(foreign)
+
+AC_PROG_CC
+
+AC_OUTPUT(Makefile)
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..14abd66
--- a/dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+hello (0.1-1) asimov; urgency=low
+
+ * First build for IPlinux
+
+ -- Mikhail Gusarov <dottedmag@dottedmag.net> Mon, 15 Jun 2009 02:32:57 +0700
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- a/dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b2ca739
--- a/dev/null
+++ b/debian/control
@@ -0,0 +1,21 @@
+Source: hello
+Section: core
+Priority: extra
+Maintainer: Mikhail Gusarov <dottedmag@dottedmag.net>
+Standards-Version: 3.8.0
+Build-Depends: debhelper (>= 7)
+XCS-Cross-Host-Build-Depends: debhelper (>= 7)
+XCS-Cross-Build-Depends:
+
+Package: hello
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: The classic greeting, and a good example
+ The hello program produces a familiar, friendly greeting.
+ .
+ This is a example of how to do `minimal' IPlinux package, without library
+ dependencies and as such is of relative use. See `hello-full' and `ehello' for
+ the examples of how to deal with libraries, pkg-config and EFL GUI.
+ .
+ Unlike Debian, which does not have a "preferred" build tool, debhelper is a
+ recommended tool for IPlinux, so there is no CDBS or plain-dpkg `hello' packages.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..b489557
--- a/dev/null
+++ b/debian/copyright
@@ -0,0 +1,16 @@
+Name: hello
+Maintainer: Mikhail Gusarov <dottedmag@dottedmag.net>
+Source: http://git.iplinux.org/hello.git
+
+Copyright: 2009, Mikhail Gusarov <dottedmag@dottedmag.net>
+License: GPL-2+
+ On Debian systems the full text of the GNU General Public
+ License can be found in the `/usr/share/common-licenses/GPL-2'
+ file.
+
+Files: debian/*
+Copyright: 2009, Mikhail Gusarov <dottedmag@dottedmag.net>
+License: GPL-2+
+ On Debian systems the full text of the GNU General Public
+ License can be found in the `/usr/share/common-licenses/GPL-2'
+ file.
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..d238cd3
--- a/dev/null
+++ b/debian/rules
@@ -0,0 +1,121 @@
+#!/usr/bin/make -f
+
+#
+# Example basic IPlinux packaging rules.
+#
+# Public domain.
+#
+
+#
+# This variable holds the architecture for the `host' - system on which program
+# will be run.
+#
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+#
+# This variable holds the architecture for the `build' - compilation system.
+#
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+#
+# Old good CFLAGS. -g is here to produce debugging info. It will be split to
+# separate package (or discarded) later, by dh_strip.
+#
+CFLAGS = -g -Wall
+
+#
+# DEB_BUILD_OPTIONS is a variable for passing various options to the build
+# process.
+#
+# It's general form is DEB_BUILD_OPTIONS=<foo>,<bar>,<baz>[=N],...
+#
+# `noopt' disables optimizations (should be enabled by default).
+#
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+#
+# `parallel=N` parallels builds.
+#
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NJOBS = -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+endif
+
+#
+# `clean' rule ought to clean all artifacts of package build and turn package
+# directory back to state it was after source unpacking.
+#
+clean:
+ dh_clean # cleans all debhelper temporary files
+ [ ! -f Makefile ] || $(MAKE) $(NJOBS) distclean # Clean temporary files of build process
+ -rm -rf Makefile.in aclocal.m4 autom4te.cache configure depcomp install-sh missing
+
+#
+# `install' rule is not strictly necessary, but often exist as a prerequisite of
+# `binary-indep' and `binary-arch' rules. It should install built software to
+# some directory.
+#
+# If the only one binary package is built from source package, then `install'
+# rule usually install all files to debian/<package name>, and `binary-*' rules
+# do not touch files.
+#
+# If more than one binary package is build from source package, then `install'
+# rule is used to install files to debian/tmp directory, and `binary-*' rules
+# are used to split one directory to several.
+#
+install: build
+ $(MAKE) $(NJOBS) DESTDIR=$(CURDIR)/debian/hello install
+
+#
+# `build' rule is also not strictly necessary, but often exist as a prerequisite
+# of `install' rule. It should perform building of package, but should not
+# install anything to the debian/
+#
+# DEB_{HOST,BUILD}_GNU_TYPE variables are passed to configure (or autogen.sh,
+# which in turn passes them to configure) to enable cross-compilation.
+#
+# This way dpkg-buildpackage -armel will generate package for arm-linux-gnueabi,
+# and not a ordinary PC package.
+#
+build: build-stamp
+build-stamp:
+ ./autogen.sh --prefix=/usr --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
+ $(MAKE) $(NJOBS)
+ touch build-stamp
+
+#
+# `binary-indep' rule is required. It should produce all Arch: all binary
+# packages necessary.
+#
+# `hello' package does not have any Arch: all packages, so this rule is empty.
+#
+binary-indep: install
+
+#
+# `binary-arch' rule is required: It should produce all binary packages which
+# are not Arch: all
+#
+# As `hello' package is quite simple, sequence of dh_* commands here is
+# short. See another packages for more useful commands to be used in binary-*
+# targets.
+#
+# Not that unlike Debian, no documentation, examples, manpages or changelogs are
+# to be packaged. If upstream make system installs them, they should be ignored
+# during packaging.
+#
+binary-arch: install
+ dh_strip -s # strips the debugging information (optionally to separate -dbg package)
+ dh_fixperms -s # ajusts permissions
+ dh_installdeb -s # installs metadata (triggers, maint. scripts etc)
+ dh_shlibdeps -s # generates shared library dependencies
+ dh_gencontrol -s # generates and installs binary package control file
+ dh_builddeb -s # makes a .deb file from debian/<package>
+
+#
+# This target is required and should just build all binary packages.
+#
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean
diff --git a/hello.c b/hello.c
new file mode 100644
index 0000000..4d5f3f6
--- a/dev/null
+++ b/hello.c
@@ -0,0 +1,26 @@
+/* hello.c -- print a greeting message and exit.
+ *
+ * © 2009 Mikhail Gusarov <dottedmag@dottedmag.net>
+ *
+ * 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 2, 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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int main()
+{
+ printf("Hello, world!\n");
+ exit(EXIT_SUCCESS);
+}