Date:2012-10-09 05:08:24 (7 years 2 months ago)
Author:Xiangfu
Commit:d59b47204ad1e420ea3dbc247622bf7b656c2ee0
Message:move debian/* to https://github.com/xiangfu/deb-pkg/

Files: debian/autogen.sh (1 diff)
debian/changelog (1 diff)
debian/changelog.upstream.awk (1 diff)
debian/clean.sh (1 diff)
debian/compat (1 diff)
debian/control (1 diff)
debian/copyright (1 diff)
debian/dirs (1 diff)
debian/fped.manpages (1 diff)
debian/get-orig-source.sh (1 diff)
debian/rules (1 diff)
debian/source/format (1 diff)
debian/watch (1 diff)

Change Details

debian/autogen.sh
1#!/bin/sh
2# Generate debian/changelog.upstream.
3#
4# Uses debian/changelog and the git revision log.
5#
6
7set -e
8
9dpkg-parsechangelog --format rfc822 --all |
10    awk -f debian/changelog.upstream.awk
debian/changelog
1fped (0.1+201210-1) unstable; urgency=low
2
3  * New snapshot, taken from commit 5b21495
4  * Switched to new project host: http://projects.qi-hardware.com/p/fped
5  * debian/rules:
6    - include debian buildflags
7    - rewrite as a minimal rules file using dh
8    - add a get-orig-source target
9  * Fix "FTBFS: tsort: cycle: ./Common: line 37: 2851 Aborted"
10    This was a "false error" - the regression test is supposed to cause
11    fped to abort, which it did, but the shell didn't print "Aborted" on
12    that(Debian on Renesas SH(sh4) CPU) platform (Closes: #606536).
13
14 -- Xiangfu Liu <xiangfu@openmobilefree.net> Mon, 08 Oct 2012 11:38:57 +0800
15
16fped (0.0+r5986-1) unstable; urgency=low
17
18  * New snapshot, taken from commit feae08f
19  * Initial release (Closes: #599090).
20
21 -- Xiangfu Liu <xiangfu@openmobilefree.net> 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.
14function 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.
24function 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.
41function 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
58BEGIN {
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.
67function 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
111END {
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
9set -e
10
11splitgitignore='#!/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
39offlimits="-type d -name '.*' -prune -o -type d -name debian -prune"
40
41remove_file_globs() {
42    while read glob
43    do
44        eval "rm -f $glob"
45    done
46}
47
48remove_directory_globs() {
49    while read glob
50    do
51        eval "rm -fr $glob"
52    done
53}
54
55remove_file_findpatterns() {
56    while read pat
57    do
58        find . $offlimits -o \
59            '(' -name "$pat" -execdir rm -f '{}' + ')'
60    done
61}
62
63remove_directory_findpatterns() {
64    while read pat
65    do
66        find . $offlimits -o \
67            '(' -type d -name "$pat" -execdir rm -fr '{}' + ')'
68    done
69}
70
71find . $offlimits -o '(' -name .gitignore -print ')' |
72while read file
73do
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"
108done
debian/compat
17
debian/control
1Source: fped
2Section: electronics
3Priority: extra
4Maintainer: Xiangfu Liu <xiangfu@openmobilefree.net>
5Build-Depends: debhelper (>= 7.4.10), dpkg-dev (>= 1.16.1~), pkg-config,
6 bash (>= 4), flex, bison,
7 imagemagick, transfig, netpbm, ghostscript,
8 libgtk2.0-dev
9Standards-Version: 3.9.4
10Homepage: http://downloads.qi-hardware.com/people/werner/fped/gui.html
11Vcs-Git: git://projects.qi-hardware.com/fped.git
12
13Package: fped
14Architecture: any
15Depends: ${shlibs:Depends}, ${misc:Depends}
16Description: Footprint editor
17 fped is an editor that allows the interactive creation of footprints of
18 electronic components. Footprint definitions are stored in a text format
19 that resembles a programming language.
20 .
21 The language is constrained such that anything that can be expressed in
22 the textual definition also has a straightforward equivalent operation
23 that can be performed through the GUI.
24 .
25 A description of the GUI can be found here:
26 http://downloads.qi-hardware.com/people/werner/fped/gui.html
debian/copyright
1This work was packaged for Debian by:
2
3    Xiangfu Liu <xiangfu@openmobilefree.net> on Mon, 4 Oct 2010 15:14:14 +0800
4
5It was downloaded from:
6
7    http://projects.qi-hardware.com/p/fped/
8
9Upstream Author:
10
11    Werner Almesberger <werner@almesberger.net>
12
13Copyright:
14
15    Copyright 2009-2011 by Werner Almesberger
16
17License:
18
19    This program is free software: you can redistribute it and/or modify
20    it under the terms of the GNU General Public License as published by
21    the Free Software Foundation, either version 2 of the License, or
22    (at your option) any later version.
23
24    This package is distributed in the hope that it will be useful,
25    but WITHOUT ANY WARRANTY; without even the implied warranty of
26    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27    GNU General Public License for more details.
28
29    You should have received a copy of the GNU General Public License
30    along with this program. If not, see <http://www.gnu.org/licenses/>.
31
32On Debian systems, the complete text of the GNU General
33Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
34
35The Debian packaging is:
36
37    Copyright (C) 2010 Xiangfu Liu <xiangfu@openmobilefree.net> and is licensed
38under the GPL version 2, see above.
39
debian/dirs
1usr/bin
debian/fped.manpages
1fped.1
debian/get-orig-source.sh
1#!/bin/sh
2# Build a tarball from the latest upstream version, with a nice
3# version number.
4#
5# Requires git 1.6.6 or later, GNU date, and gzip.
6
7set -e
8
9: ${REPO=git://projects.qi-hardware.com/fped.git}
10: ${BRANCH=remotes/origin/master}
11
12mkdir debian-orig-source
13trap 'rm -fr debian-orig-source || exit 1' EXIT
14
15git init -q debian-orig-source
16GIT_DIR=$(pwd)/debian-orig-source/.git
17export GIT_DIR
18
19# Fetch latest upstream version.
20git fetch -q "$REPO" "$BRANCH"
21
22# Determine version number.
23release=0.1
24date=$(date --utc --date="$(git log -1 --pretty=format:%cD FETCH_HEAD)" "+%Y%m")
25upstream_version="${release}+${date}"
26
27# Generate tarball.
28echo "packaging $(git rev-parse --short FETCH_HEAD)"
29git archive --format=tar --prefix="fped_${date}/" FETCH_HEAD |
30    gzip -n -9 >"fped_$upstream_version.orig.tar.gz"
debian/rules
1#!/usr/bin/make -f
2# This file is in the public domain.
3# You may freely use, modify, distribute, and relicense it.
4
5# Uncomment this to turn on verbose mode.
6#export DH_VERBOSE=1
7
8DPKG_EXPORT_BUILDFLAGS = 1
9include /usr/share/dpkg/buildflags.mk
10
11export PREFIX=/usr
12
13%:
14    dh $@
15
16override_dh_auto_clean:
17    $(MAKE) spotless
18    sh debian/clean.sh
19
20override_dh_installchangelogs:
21    dpkg-parsechangelog --format rfc822 --all | \
22        awk -f debian/changelog.upstream.awk
23    dh_installchangelogs debian/changelog.upstream
24
25REPO = git://projects.qi-hardware.com/fped.git
26BRANCH = master
27get-orig-source:
28    REPO='$(REPO)' BRANCH='$(BRANCH)' \
29        sh ./debian/get-orig-source.sh
30
debian/source/format
13.0 (quilt)
debian/watch
1# We track fped svn revisions, thus no need for a watch file.

Archive Download the corresponding diff file

Branches:
master



interactive