summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-07-26 08:57:14 +0200
committerPaul Buetow <paul@buetow.org>2013-07-26 08:57:14 +0200
commitd38f6b1aeb6e44831ceedc8b1d35347228f751a4 (patch)
tree228481f503ef9e499013143407897a4282ba8137
parentbaf648b42f53389d8ff11439670640194fa14a6f (diff)
initial debian stuff
-rw-r--r--Makefile53
-rw-r--r--debian/README7
-rw-r--r--debian/compat1
-rw-r--r--debian/control16
-rw-r--r--debian/copyright28
-rw-r--r--debian/cpuinfo.manpages1
-rw-r--r--debian/cpuinfo.substvars2
-rwxr-xr-xdebian/rules13
-rw-r--r--docs/cpuinfo.1147
-rw-r--r--docs/cpuinfo.pod23
-rw-r--r--docs/cpuinfo.txt18
-rwxr-xr-xsrc/cpuinfo (renamed from cpuinfo)0
12 files changed, 309 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6ab4551
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,53 @@
+NAME=cpuinfo
+all: version documentation build
+
+# Builds the project. Since this is only a fake project, it just copies a script.
+build:
+ cp -p ./src/$(NAME) bin/$(NAME)
+
+# 'install' installes a fake-root, which will be used to build the Debian package
+# $DESTDIR is actually set by the Debian tools.
+install:
+ test ! -d $(DESTDIR)/usr/bin && mkdir -p $(DESTDIR)/usr/bin || exit 0
+ test ! -d $(DESTDIR)/usr/share/$(NAME) && mkdir -p $(DESTDIR)/usr/share/$(NAME) || exit 0
+ cp ./bin/* $(DESTDIR)/usr/bin
+ #cp -r ./lib $(DESTDIR)/usr/share/$(NAME)/lib
+
+deinstall:
+ test ! -z "$(DESTDIR)" && test -f $(DESTDIR)/usr/bin/$(NAME) && rm $(DESTDIR)/usr/bin/$(NAME) || exit 0
+ test ! -z "$(DESTDIR)/usr/share/$(NAME)" && -d $(DESTDIR)/usr/share/$(NAME) && rm -r $(DESTDIR)/usr/share/$(NAME) || exit 0
+
+clean:
+ rm bin/*
+
+# ADDITIONAL RULES:
+
+# Parses the version out of the Debian changelog
+version:
+ cut -d' ' -f2 debian/changelog | head -n 1 | sed 's/(//;s/)//' > .version
+
+# Builds the documentation into a manpage
+documentation:
+ pod2man --release="$(NAME) $$(cat .version)" \
+ --center="User Commands" ./docs/$(NAME).pod > ./docs/$(NAME).1
+ pod2text ./docs/$(NAME).pod > ./docs/$(NAME).txt
+
+# Build a debian package (don't sign it, modify the arguments if you want to sign it)
+deb: all
+ dpkg-buildpackage -uc -us
+
+dch:
+ dch -i
+
+release: dch deb
+ bash -c "git tag $$(cat .version)"
+ git push --tags
+ git commit -a -m 'New release'
+ git push origin master
+
+clean-top:
+ rm ../$(NAME)_*.tar.gz
+ rm ../$(NAME)_*.dsc
+ rm ../$(NAME)_*.changes
+ rm ../$(NAME)_*.deb
+
diff --git a/debian/README b/debian/README
new file mode 100644
index 0000000..70c605a
--- /dev/null
+++ b/debian/README
@@ -0,0 +1,7 @@
+The Debian Package cpuinfo
+----------------------------
+
+This is just a hobby project. Not sure if everything meets the debian
+policy though.
+
+ -- Paul Buetow <paul@buetow.org> Sun, 08 Apr 2012 15:23:53 +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..4988508
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,16 @@
+Source: cpuinfo
+Section: net
+Priority: optional
+Maintainer: Paul Buetow <paul@buetow.org>
+Build-Depends: perl, make
+Standards-Version: 3.9.2
+Homepage: http://cpuinfo.buetow.org
+Vcs-Git: git://git.bueto.org/cpuinfo
+Vcs-Browser: http://web.buetow.org/git/?p=cpuinfo.git;a=summary
+
+Package: cpuinfo
+Architecture: all
+Depends: ${shlibs:Depends}
+Description: A tiny AWK script to print out CPU infos.
+ This is a tiny AWK script to print out CPU infos. All infos are gathered from
+ the procfs.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..d32a464
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,28 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: cpuinfo
+Source: http://cpuinfo.buetow.org
+
+Files: *
+Copyright: 2012 Paul Buetow <paul@buetow.org>
+License: GPL-3.0+
+
+Files: debian/*
+Copyright: 2012 Paul Buetow <paul@buetow.org>
+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".
diff --git a/debian/cpuinfo.manpages b/debian/cpuinfo.manpages
new file mode 100644
index 0000000..fd544a6
--- /dev/null
+++ b/debian/cpuinfo.manpages
@@ -0,0 +1 @@
+docs/cpuinfo.1
diff --git a/debian/cpuinfo.substvars b/debian/cpuinfo.substvars
new file mode 100644
index 0000000..54b6fa4
--- /dev/null
+++ b/debian/cpuinfo.substvars
@@ -0,0 +1,2 @@
+shlibs:Depends=
+misc:Depends=gawk
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b760bee
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@
+#!/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 $@
diff --git a/docs/cpuinfo.1 b/docs/cpuinfo.1
new file mode 100644
index 0000000..2ec3782
--- /dev/null
+++ b/docs/cpuinfo.1
@@ -0,0 +1,147 @@
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "CBARS 1"
+.TH CBARS 1 "2013-07-21" "cpuinfo 0.0.0-develop" "User Commands"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+Cbars \- A small and humble tool to observe server loads
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+cpuinfo [\s-1LIST\s0 \s-1OF\s0 \s-1HOSTNAMES\s0]
+.SS "Tested platforms"
+.IX Subsection "Tested platforms"
+This version of Cbars has only been tested on Debian GNU/Linux Wheezy.
+.PP
+There is no release made yet atm. So please come back later and don't use this yet.
+.SH "LICENSE"
+.IX Header "LICENSE"
+See package description or project website.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Paul Buetow \- <http://cpuinfo.buetow.org>
diff --git a/docs/cpuinfo.pod b/docs/cpuinfo.pod
new file mode 100644
index 0000000..bc52481
--- /dev/null
+++ b/docs/cpuinfo.pod
@@ -0,0 +1,23 @@
+=head1 NAME
+
+Cbars - A small and humble tool to observe server loads
+
+=head1 SYNOPSIS
+
+cpuinfo [LIST OF HOSTNAMES]
+
+=head2 Tested platforms
+
+This version of Cbars has only been tested on Debian GNU/Linux Wheezy.
+
+There is no release made yet atm. So please come back later and don't use this yet.
+
+=head1 LICENSE
+
+See package description or project website.
+
+=head1 AUTHOR
+
+Paul Buetow - <http://cpuinfo.buetow.org>
+
+=cut
diff --git a/docs/cpuinfo.txt b/docs/cpuinfo.txt
new file mode 100644
index 0000000..992baf1
--- /dev/null
+++ b/docs/cpuinfo.txt
@@ -0,0 +1,18 @@
+NAME
+ Cbars - A small and humble tool to observe server loads
+
+SYNOPSIS
+ cpuinfo [LIST OF HOSTNAMES]
+
+ Tested platforms
+ This version of Cbars has only been tested on Debian GNU/Linux Wheezy.
+
+ There is no release made yet atm. So please come back later and don't
+ use this yet.
+
+LICENSE
+ See package description or project website.
+
+AUTHOR
+ Paul Buetow - <http://cpuinfo.buetow.org>
+
diff --git a/cpuinfo b/src/cpuinfo
index 3e5ce01..3e5ce01 100755
--- a/cpuinfo
+++ b/src/cpuinfo