debian/changelog |
| 1 | fped (0.0+201205-1) lucid; urgency=low |
| 2 | |
| 3 | * New snapshot, taken from commit 59b90b3 |
| 4 | * Switched to new project host: http://projects.qi-hardware.com/p/fped |
| 5 | * debian/rules: |
| 6 | - rewrite as a minimal rules file using dh |
| 7 | - add a get-orig-source target |
| 8 | * debian/autogen.sh: new script |
| 9 | |
| 10 | -- Xiangfu Liu <xiangfu@sharism.cc> Thu, 21 Jun 2012 16:58:21 +0800 |
| 11 | |
1 | 12 | fped (0.0+r6006-1) lucid; urgency=low |
2 | 13 | |
| 14 | * New snapshot, taken from commit 78e4ba0 |
3 | 15 | * update to r6006 |
4 | 16 | |
5 | 17 | -- Xiangfu Liu <xiangfu@sharism.cc> Fri, 25 Mar 2011 08:43:21 +0800 |
6 | 18 | |
7 | 19 | fped (0.0+r6005-1) lucid; urgency=low |
8 | 20 | |
| 21 | * New snapshot, taken from commit 335ddb6 |
9 | 22 | * update to r6005 |
10 | 23 | |
11 | 24 | -- Xiangfu Liu <xiangfu@sharism.cc> Wed, 23 Mar 2011 16:28:26 +0800 |
12 | 25 | |
13 | 26 | fped (0.0+r5999-1) lucid; urgency=low |
14 | 27 | |
| 28 | * New snapshot, taken from commit 1409cfa |
15 | 29 | * update to r5999 |
16 | 30 | |
17 | 31 | -- Xiangfu Liu <xiangfu@sharism.cc> Tue, 22 Mar 2011 15:12:02 +0800 |
18 | 32 | |
19 | 33 | fped (0.0+r5997-1) lucid; urgency=low |
20 | 34 | |
| 35 | * New snapshot, taken from commit ceaa519 |
21 | 36 | * Fix "FTBFS: tsort: cycle: ./Common: line 37: 2851 Aborted" |
22 | 37 | This was a "false error" - the regression test is supposed to cause |
23 | 38 | fped to abort, which it did, but the shell didn't print "Aborted" on |
... | ... | |
28 | 43 | |
29 | 44 | fped (0.0+r5986-1) unstable; urgency=low |
30 | 45 | |
| 46 | * New snapshot, taken from commit feae08f |
31 | 47 | * Initial release (Closes: #599090). |
32 | 48 | |
33 | 49 | -- Xiangfu Liu <xiangfu@sharism.cc> Mon, 04 Oct 2010 23:27:52 +0800 |
debian/changelog.upstream.awk |
| 1 | #!/bin/awk -f |
| 2 | # Generate debian/changelog.upstream from debian/changelog and |
| 3 | # the git revision log. Inspired by Gerrit Pape’s |
| 4 | # debian/changelog.upstream.sh, from the git-core Debian package. |
| 5 | # |
| 6 | # Requires a working /dev/stderr. |
| 7 | # |
| 8 | # Usage: |
| 9 | # dpkg-parsechangelog --format rfc822 --all | |
| 10 | # awk -f debian/changelog.upstream.awk |
| 11 | |
| 12 | # If argument matches /^Version: /, return remaining text. |
| 13 | # Result is nonempty if and only if argument matches. |
| 14 | function version_line(line) { |
| 15 | if (line ~ /^Version: /) { |
| 16 | sub(/^Version: /, "", line); |
| 17 | return line; |
| 18 | } |
| 19 | return ""; |
| 20 | } |
| 21 | |
| 22 | # If argument matches /^\*.* from commit /, return remaining text. |
| 23 | # Result is nonempty if and only if argument matches. |
| 24 | function commit_id_line(line) { |
| 25 | if (line ~ / from commit /) { |
| 26 | sub(/^.* from commit /, "", line); |
| 27 | sub(/[(][Cc]loses.*/, "", line); |
| 28 | sub(/[^0-9a-f]*$/, "", line); |
| 29 | return line; |
| 30 | } |
| 31 | return ""; |
| 32 | } |
| 33 | |
| 34 | # Read standard input, scanning for a changelog entry of the |
| 35 | # form “* New snapshot, taken from commit <blah>.” |
| 36 | # Result is <blah>. |
| 37 | # Result is empty and writes a message to standard error if no such entry is |
| 38 | # found before the next Version: line with a different upstream |
| 39 | # version (or EOF). |
| 40 | # Argument is the upstream version sought. |
| 41 | function read_commit_id(upstream, line,version,corresponding_upstream,commit) { |
| 42 | while (getline line) { |
| 43 | version = version_line(line); |
| 44 | corresponding_upstream = version; |
| 45 | sub(/-[^-]*$/, "", corresponding_upstream); |
| 46 | if (version != "" && corresponding_upstream != upstream) |
| 47 | break; |
| 48 | |
| 49 | commit = commit_id_line(line); |
| 50 | if (commit != "") |
| 51 | return commit; |
| 52 | } |
| 53 | |
| 54 | print "No commit id for " upstream >> "/dev/stderr"; |
| 55 | return ""; |
| 56 | } |
| 57 | |
| 58 | BEGIN { |
| 59 | last = "none"; |
| 60 | last_cid = "none"; |
| 61 | cl = "debian/changelog.upstream"; |
| 62 | } |
| 63 | |
| 64 | # Add a list of all revisions up to last to debian/changelog.upstream |
| 65 | # and set last = new_cid. |
| 66 | # new is a user-readable name for the commit new_cide. |
| 67 | function add_version(new,new_cid, limiter,versionline,command,line) { |
| 68 | if (last == "none") { |
| 69 | printf "" > cl; |
| 70 | last = new; |
| 71 | last_cid = new_cid; |
| 72 | return 0; |
| 73 | } |
| 74 | |
| 75 | if (new == "none") { |
| 76 | versionline = "Version " last; |
| 77 | limiter = ""; |
| 78 | } else { |
| 79 | versionline = "Version " last "; changes since " new ":"; |
| 80 | limiter = new_cid ".."; |
| 81 | } |
| 82 | print versionline >> cl; |
| 83 | gsub(/./, "-", versionline); |
| 84 | print versionline >> cl; |
| 85 | |
| 86 | print "" >> cl; |
| 87 | command = "git shortlog \"" limiter last_cid "\""; |
| 88 | while(command | getline line) |
| 89 | print line >> cl; |
| 90 | |
| 91 | if (new != "none") |
| 92 | print "" >> cl; |
| 93 | last = new; |
| 94 | last_cid = new_cid; |
| 95 | } |
| 96 | |
| 97 | { |
| 98 | version = version_line($0); |
| 99 | if (version != "") { |
| 100 | # strip Debian revision |
| 101 | upstream_version = version; |
| 102 | sub(/-[^-]*$/, "", upstream_version); |
| 103 | |
| 104 | commit = read_commit_id(upstream_version); |
| 105 | if (commit == "") |
| 106 | exit 1; |
| 107 | add_version(upstream_version, commit); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | END { |
| 112 | add_version("none", "none"); |
| 113 | } |
debian/clean.sh |
| 1 | #!/bin/sh |
| 2 | # Clean up after a failed build. |
| 3 | # |
| 4 | # Requires access to .gitignore files excluding _all_ modified files. |
| 5 | # |
| 6 | # Requires a working /dev/fd (with more than just /dev/fd/0 and 1) |
| 7 | # or gawk. |
| 8 | |
| 9 | set -e |
| 10 | |
| 11 | splitgitignore='#!/usr/bin/awk |
| 12 | !/^#/ && !/^$/ { |
| 13 | glob = /[[*?]/; |
| 14 | directory = /\/$/; |
| 15 | sub(/\/$/, ""); |
| 16 | anchored = /\//; |
| 17 | sub(/^\//, ""); |
| 18 | |
| 19 | output = "nonexistent/nonsense"; |
| 20 | if (anchored) { |
| 21 | if (!directory && !glob) |
| 22 | output = "/dev/fd/1"; |
| 23 | else if (directory && !glob) |
| 24 | output = "/dev/fd/3"; |
| 25 | else if (!directory && glob) |
| 26 | output = "/dev/fd/4"; |
| 27 | else if (directory && glob) |
| 28 | output = "/dev/fd/5"; |
| 29 | } else { |
| 30 | if (!directory) |
| 31 | output = "/dev/fd/6"; |
| 32 | else |
| 33 | output = "/dev/fd/7"; |
| 34 | } |
| 35 | print >> output; |
| 36 | } |
| 37 | ' |
| 38 | |
| 39 | offlimits="-type d -name '.*' -prune -o -type d -name debian -prune" |
| 40 | |
| 41 | remove_file_globs() { |
| 42 | while read glob |
| 43 | do |
| 44 | eval "rm -f $glob" |
| 45 | done |
| 46 | } |
| 47 | |
| 48 | remove_directory_globs() { |
| 49 | while read glob |
| 50 | do |
| 51 | eval "rm -fr $glob" |
| 52 | done |
| 53 | } |
| 54 | |
| 55 | remove_file_findpatterns() { |
| 56 | while read pat |
| 57 | do |
| 58 | find . $offlimits -o \ |
| 59 | '(' -name "$pat" -execdir rm -f '{}' + ')' |
| 60 | done |
| 61 | } |
| 62 | |
| 63 | remove_directory_findpatterns() { |
| 64 | while read pat |
| 65 | do |
| 66 | find . $offlimits -o \ |
| 67 | '(' -type d -name "$pat" -execdir rm -fr '{}' + ')' |
| 68 | done |
| 69 | } |
| 70 | |
| 71 | find . $offlimits -o '(' -name .gitignore -print ')' | |
| 72 | while read file |
| 73 | do |
| 74 | ( |
| 75 | cd "$(dirname "$file")" |
| 76 | # Dispatch using pipes. Yuck. |
| 77 | { { { { { |
| 78 | awk "$splitgitignore" | |
| 79 | { |
| 80 | # anchored files (globless) |
| 81 | xargs -d '\n' rm -f |
| 82 | } |
| 83 | } 3>&1 >&2 | |
| 84 | { |
| 85 | # anchored directories (globless) |
| 86 | xargs -d '\n' rm -fr |
| 87 | } |
| 88 | } 4>&1 >&2 | |
| 89 | { |
| 90 | # anchored files |
| 91 | remove_file_globs |
| 92 | } |
| 93 | } 5>&1 >&2 | |
| 94 | { |
| 95 | # anchored directories |
| 96 | remove_directory_globs |
| 97 | } |
| 98 | } 6>&1 >&2 | |
| 99 | { |
| 100 | # unanchored files |
| 101 | remove_file_findpatterns |
| 102 | } |
| 103 | } 7>&1 >&2 | |
| 104 | { |
| 105 | remove_directory_findpatterns |
| 106 | } >&2 |
| 107 | ) < "$file" |
| 108 | done |
debian/get-orig-source.sh |
1 | 1 | #!/bin/sh |
2 | 2 | # Build a tarball from the latest upstream version, with a nice |
3 | 3 | # version number. |
| 4 | # |
| 5 | # Requires git 1.6.6 or later, GNU date, and gzip. |
4 | 6 | |
5 | 7 | set -e |
6 | 8 | |
7 | | # Determine version number. |
8 | | release=0.0 |
9 | | upstream_version="${release}+r${REV}" |
| 9 | : ${REPO=$(git rev-parse --git-dir)} |
| 10 | : ${BRANCH=remotes/origin/master} |
| 11 | |
| 12 | mkdir debian-orig-source |
| 13 | trap 'rm -fr debian-orig-source || exit 1' EXIT |
10 | 14 | |
11 | | TOPFOLDER=fped-$upstream_version.orig |
| 15 | git init -q debian-orig-source |
| 16 | GIT_DIR=$(pwd)/debian-orig-source/.git |
| 17 | export GIT_DIR |
12 | 18 | |
13 | | trap 'rm -fr ${TOPFOLDER} || exit 1' EXIT INT TERM |
| 19 | # Fetch latest upstream version. |
| 20 | git fetch -q "$REPO" "$BRANCH" |
14 | 21 | |
15 | | svn export -r${REV} http://svn.openmoko.org/trunk/eda/fped ${TOPFOLDER} |
| 22 | # Determine version number. |
| 23 | release=0.0 |
| 24 | date=$(date --utc --date="$(git log -1 --pretty=format:%cD FETCH_HEAD)" "+%Y%m") |
| 25 | upstream_version="${release}+${date}" |
16 | 26 | |
17 | 27 | # Generate tarball. |
18 | | echo "packaging ..." |
19 | | tar -czf fped_$upstream_version.orig.tar.gz ${TOPFOLDER} |
| 28 | echo "packaging $(git rev-parse --short FETCH_HEAD)" |
| 29 | git archive FETCH_HEAD | |
| 30 | gzip -n -9 >"fped_$upstream_version.orig.tar.gz" |
debian/rules |
1 | 1 | #!/usr/bin/make -f |
2 | | # -*- makefile -*- |
3 | | # Sample debian/rules that uses debhelper. |
4 | | # This file was originally written by Joey Hess and Craig Small. |
5 | | # As a special exception, when this file is copied by dh-make into a |
6 | | # dh-make output file, you may use that output file without restriction. |
7 | | # This special exception was added by Craig Small in version 0.37 of dh-make. |
| 2 | # This file is in the public domain. |
| 3 | # You may freely use, modify, distribute, and relicense it. |
8 | 4 | |
9 | 5 | # Uncomment this to turn on verbose mode. |
10 | 6 | #export DH_VERBOSE=1 |
11 | 7 | |
12 | 8 | export PREFIX=/usr |
13 | 9 | |
14 | | REV=6006 |
15 | | debiandir_SQ = $(subst ','\'',$(dir $(lastword $(MAKEFILE_LIST)))) |
16 | | get-orig-source: |
17 | | REV='$(REV)' sh '$(debiandir_SQ)'get-orig-source.sh |
| 10 | build clean install binary-arch binary-indep binary: |
| 11 | +dh --parallel $(opt_no_act) $@ |
18 | 12 | |
19 | 13 | override_dh_auto_clean: |
20 | | make spotless |
| 14 | $(MAKE) spotless |
| 15 | sh debian/clean.sh |
| 16 | |
| 17 | override_dh_installchangelogs: |
| 18 | dpkg-parsechangelog --format rfc822 --all | \ |
| 19 | awk -f debian/changelog.upstream.awk |
| 20 | dh_installchangelogs debian/changelog.upstream |
| 21 | |
| 22 | opt_optimize = CFLAGS="-g -O2" |
| 23 | opt_no_act = |
| 24 | opt_quiet = |
| 25 | |
| 26 | ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
| 27 | opt_optimize = CFLAGS="-g -O0" |
| 28 | endif |
| 29 | |
| 30 | ifneq (,$(findstring n,$(MAKEFLAGS))) |
| 31 | opt_no_act = --no-act |
| 32 | endif |
| 33 | |
| 34 | ifneq (,$(filter quiet,$(DEB_BUILD_OPTIONS))) |
| 35 | opt_quiet = --quiet |
| 36 | MAKEFLAGS += --quiet |
| 37 | endif |
| 38 | |
| 39 | REPO = git://projects.qi-hardware.com/fped.git |
| 40 | BRANCH = master |
| 41 | debiandir_SQ = $(subst ','\'',$(dir $(lastword $(MAKEFILE_LIST)))) |
| 42 | get-orig-source: |
| 43 | REPO='$(REPO)' BRANCH='$(BRANCH)' \ |
| 44 | sh '$(debiandir_SQ)'get-orig-source.sh |
21 | 45 | |
22 | 46 | %: |
23 | 47 | dh $@ |