]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Added preliminary version of Debian packaging
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sat, 15 Dec 2012 23:33:01 +0000 (00:33 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 16 Dec 2012 00:05:22 +0000 (01:05 +0100)
17 files changed:
Makefile
debian/boost-statechart-viewer.1 [new file with mode: 0644]
debian/boost-statechart-viewer.doc-base.EX [new file with mode: 0644]
debian/boost-statechart-viewer.manpages [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/menu.ex [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
debian/substvars [new file with mode: 0644]
debian/watch.ex [new file with mode: 0644]
examples/Makefile
src/Makefile
src/boost-statechart-viewer.sh [moved from src/boost-statechart-viewer with 58% similarity, mode: 0644]

index 4aade4d4b1f14fb2d4b2a438f471c4efb18eaeb3..c924b2ee7de937080f00dedb4d2164cb1487412d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,21 @@
+PREFIX=/usr
+
 all: src examples
 
-.PHONY: src examples
+.PHONY: src examples clean install
 
 src:
        $(MAKE) -C src
 
 examples: src
        $(MAKE) -C examples
+
+install:
+       mkdir -p "$(DESTDIR)$(PREFIX)/lib/boost-statechart-viewer"
+       install -m0644 src/visualizer.so "$(DESTDIR)$(PREFIX)/lib/boost-statechart-viewer"
+       mkdir -p "$(DESTDIR)$(PREFIX)/bin"
+       install src/boost-statechart-viewer "$(DESTDIR)$(PREFIX)/bin"
+
+clean:
+       $(MAKE) -C src $@
+       $(MAKE) -C examples $@
diff --git a/debian/boost-statechart-viewer.1 b/debian/boost-statechart-viewer.1
new file mode 100644 (file)
index 0000000..985417e
--- /dev/null
@@ -0,0 +1,48 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" (C) Copyright 2012 Michal Sojka <sojkam1@fel.cvut.cz>,
+.\"
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH BOOST-STATECHART-VIEWER 1 "December 15, 2012"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+boost-statechart-viewer \- program for visualization of state machines
+written in C++ with boost/statechart library
+.SH SYNOPSIS
+.B boost-statechart-viewer
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B boost-statechart-viewer
+command.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
+.\" respectively.
+\fBboost-statechart-viewer\fP is a program that...
+.SH OPTIONS
+This program takes no options.
+\" These programs follow the usual GNU command line syntax, with long
+\" options starting with two dashes (`-').
+\" A summary of options is included below.
+\" For a complete description, see the Info files.
+\" .TP
+\" .B \-h, \-\-help
+\" Show summary of options.
+\" .TP
+\" .B \-v, \-\-version
+\" Show version of program.
+.SH SEE ALSO
+.BR clang++ (1).
diff --git a/debian/boost-statechart-viewer.doc-base.EX b/debian/boost-statechart-viewer.doc-base.EX
new file mode 100644 (file)
index 0000000..3312456
--- /dev/null
@@ -0,0 +1,20 @@
+Document: boost-statechart-viewer
+Title: Debian boost-statechart-viewer Manual
+Author: <insert document author here>
+Abstract: This manual describes what boost-statechart-viewer is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/boost-statechart-viewer/boost-statechart-viewer.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/boost-statechart-viewer/boost-statechart-viewer.ps.gz
+
+Format: text
+Files: /usr/share/doc/boost-statechart-viewer/boost-statechart-viewer.text.gz
+
+Format: HTML
+Index: /usr/share/doc/boost-statechart-viewer/html/index.html
+Files: /usr/share/doc/boost-statechart-viewer/html/*.html
diff --git a/debian/boost-statechart-viewer.manpages b/debian/boost-statechart-viewer.manpages
new file mode 100644 (file)
index 0000000..8589a8d
--- /dev/null
@@ -0,0 +1 @@
+debian/boost-statechart-viewer.1
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..ff0743f
--- /dev/null
@@ -0,0 +1,5 @@
+boost-statechart-viewer (20121215) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Michal Sojka <sojkam1@fel.cvut.cz>  Sat, 15 Dec 2012 16:49:39 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..7f1bf62
--- /dev/null
@@ -0,0 +1,18 @@
+Source: boost-statechart-viewer
+Section: devel
+Priority: extra
+Maintainer: Michal Sojka <sojkam1@fel.cvut.cz>
+Build-Depends: debhelper (>= 8.0.0), autotools-dev, libclang-dev (>= 3.1), llvm-3.1-dev
+Standards-Version: 3.9.3
+Homepage: https://rtime.felk.cvut.cz/statechart-viewer/
+#Vcs-Git: git://git.debian.org/collab-maint/boost-statechart-viewer.git
+#Vcs-Browser: http://git.debian.org/?p=collab-maint/boost-statechart-viewer.git;a=summary
+
+Package: boost-statechart-viewer
+Architecture: any
+Depends: clang (>= 3.1), ${shlibs:Depends}, ${misc:Depends}
+Description: Visualization of state machines written with boost/statechart library
+ Boost-statechart-viewer is a program for visualization of state
+ machines written in C++ with boost/statechart library. The program
+ itself is written in C++ and uses clang from LLVM project for
+ analyzing the source code.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..73278f0
--- /dev/null
@@ -0,0 +1,34 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: boost-statechart-viewer
+Source: <url://example.com>
+
+Files: *
+Copyright: <years> <put author's name and email here>
+           <years> <likewise for another author>
+License: GPL-3.0+
+
+Files: debian/*
+Copyright: 2012 Michal Sojka <sojkam1@fel.cvut.cz>
+License: GPL-3.0+
+
+License: GPL-3.0+
+ 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 package 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, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+# Please avoid to pick license terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..c7ca02b
--- /dev/null
@@ -0,0 +1,2 @@
+Readme.txt
+Readme.txt
diff --git a/debian/menu.ex b/debian/menu.ex
new file mode 100644 (file)
index 0000000..5895f9d
--- /dev/null
@@ -0,0 +1,2 @@
+?package(boost-statechart-viewer):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
+  title="boost-statechart-viewer" command="/usr/bin/boost-statechart-viewer"
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..8eb38a9
--- /dev/null
@@ -0,0 +1,20 @@
+#!/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.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+       dh $@
+
+override_dh_auto_configure:
+       echo "LLVM_CONFIG := llvm-config-3.1" > Makefile.config
+       echo "LIBDIR := /usr/lib/boost-statechart-viewer" >> Makefile.config
+
+override_dh_auto_build:
+       $(MAKE) -C src
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/debian/substvars b/debian/substvars
new file mode 100644 (file)
index 0000000..4fe2360
--- /dev/null
@@ -0,0 +1 @@
+shlibs:Depends=libc6 (>= 2.2.5), libffi5 (>= 3.0.4), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6)
diff --git a/debian/watch.ex b/debian/watch.ex
new file mode 100644 (file)
index 0000000..f6065b8
--- /dev/null
@@ -0,0 +1,23 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+# Uncomment to examine a Webpage
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php boost-statechart-viewer-(.*)\.tar\.gz
+
+# Uncomment to examine a Webserver directory
+#http://www.example.com/pub/boost-statechart-viewer-(.*)\.tar\.gz
+
+# Uncommment to examine a FTP server
+#ftp://ftp.example.com/pub/boost-statechart-viewer-(.*)\.tar\.gz debian uupdate
+
+# Uncomment to find new files on sourceforge, for devscripts >= 2.9
+# http://sf.net/boost-statechart-viewer/boost-statechart-viewer-(.*)\.tar\.gz
+
+# Uncomment to find new files on GooglePages
+# http://example.googlepages.com/foo.html boost-statechart-viewer-(.*)\.tar\.gz
index d71a9ac9e4d74e649318216cf82238163dc00352..6dab2c37b47011c0b1e7b3f835cf3e6551bc4a3a 100644 (file)
@@ -1,7 +1,13 @@
 -include ../Makefile.config
 
-.PHONY: all
-all: test.pdf StopWatch.pdf main.pdf Camera/Main.pdf Keyboard.pdf
+.PHONY: all clean
+
+PDF = test.pdf StopWatch.pdf main.pdf Camera/Main.pdf Keyboard.pdf
+
+all: $(PDF)
+
+clean:
+       rm -f $(PDF)
 
 CLANG++ ?= $(shell $(LLVM_CONFIG) --bindir)/clang++
 ifeq ($(wildcard $(CLANG++)),)
index ccc7eb212c52e1ef9b0866282a7a9d7433bdc1cc..77e0480cdf6c4893af164cb647c1efab284afdeb 100644 (file)
@@ -5,9 +5,19 @@ LLVM_CONFIG ?= llvm-config
 LLVM_FLAGS := $(shell $(LLVM_CONFIG) --cxxflags --ldflags --libs jit core)
 LLVM_FLAGS := $(filter-out -DNDEBUG,$(LLVM_FLAGS))
 
+LIBDIR ?= $(CURDIR)
+
 CLANG_LIBS := -lclangParse -lclangFrontend -lclangSerialization        \
  -lclangDriver -lclangCodeGen -lclangSema -lclangAnalysis      \
  -lclangRewrite -lclangAST -lclangLex -lclangBasic -lclangEdit
 
+all: visualizer.so boost-statechart-viewer
+
 visualizer.so: visualizer.cpp
        $(CXX) -g -fno-rtti -shared -Wall $(CLANG_LIBS) $(LLVM_FLAGS) -o $@ $<
+
+boost-statechart-viewer: boost-statechart-viewer.sh
+       sed -e s,@libdir@,$(LIBDIR), $< > $@
+
+clean:
+       rm -f boost-statechart-viewer visualizer.so
old mode 100755 (executable)
new mode 100644 (file)
similarity index 58%
rename from src/boost-statechart-viewer
rename to src/boost-statechart-viewer.sh
index da20022..b1efa79
@@ -4,7 +4,7 @@ set -e
 
 for src in "$@"; do
     s=${src%.cpp}
-    clang -Xclang -load -Xclang ../src/visualizer.so -Xclang -plugin -Xclang visualize-statechart -c $src
+    clang++ -Xclang -load -Xclang @libdir@/visualizer.so -Xclang -plugin -Xclang visualize-statechart -c $src
     dot -Tps $s.dot > $s.eps
     epstopdf $s.eps > $s.pdf
     rm $s.dot $s.eps