Skip to content

Commit

Permalink
Debian package pgcharts.
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri committed Sep 12, 2014
1 parent 21ffc62 commit 198ea9d
Show file tree
Hide file tree
Showing 17 changed files with 505 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ DEBUILD_ROOT = /tmp/pgcharts

all: $(PGCHARTS)

docs:
ronn -roff pginstall.1.md

clean:
rm -rf $(LIBS) $(QUICKLISP) $(QLDIR) $(MANIFEST) $(BUILDAPP) $(PGCHARTS)

Expand Down Expand Up @@ -110,8 +113,8 @@ pgcharts: $(PGCHARTS) ;

deb:
# intended for use on a debian system
mkdir -p $(DEBUILD_ROOT) && rm -rf $(DEBUILD_ROOT)/*
rsync -Ca --exclude=build/* ./ $(DEBUILD_ROOT)/
mkdir -p $(DEBUILD_ROOT) && rm -rf $(DEBUILD_ROOT)
rsync -Ca --exclude=build --exclude=.vagrant ./ $(DEBUILD_ROOT)/
cd $(DEBUILD_ROOT) && make -f debian/rules orig
cd $(DEBUILD_ROOT) && debuild -us -uc -sa
cp -a /tmp/pgcharts_* build/
26 changes: 26 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure("2") do |config|
config.vm.box = "wheezy64"

config.vm.provision :file do |file|
file.source = 'vm-conf/devscripts'
file.destination = '/home/vagrant/.devscripts'
end

config.vm.provision :file do |file|
file.source = 'vm-conf/gpg.conf'
file.destination = '/home/vagrant/.gnupg/gpg.conf'
end

config.vm.provision "shell" do |s|
s.path = "vm-conf/bootstrap.sh"
s.privileged = false
end

config.vm.network :forwarded_port, guest: 9042, host: 9042
end
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pgcharts (1.0-1) unstable; urgency=medium

* First release.

-- Dimitri Fontaine <[email protected]> Wed, 10 Sep 2014 16:38:38 +0400
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
19 changes: 19 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Source: pgcharts
Priority: extra
Maintainer: Dimitri Fontaine <[email protected]>
Uploaders: Christoph Berg <[email protected]>
Build-Depends: debhelper (>= 9), sbcl (>= 1.2.0), buildapp (>= 1.5), cl-asdf (>= 3.0.3), cl-postmodern, cl-simple-date, cl-esrap, cl-py-configparser, cl-split-sequence, cl-ppcre, cl-alexandria, cl-hunchentoot, cl-yason, cl-closer-mop, cl-daemon, cl-who, cl-bordeaux-threads (>= 0.8.3), cl-curry-compose-reader-macros, cl-metabang-bind, cl-graph, cl-trivial-backtrace, cl-drakma, ruby-ronn
Standards-Version: 3.9.5
Section: database
Homepage: https://github.com/dimitri/pgcharts
Vcs-Git: https://github.com/dimitri/pgcharts.git
Vcs-Browser: https://github.com/dimitri/pgcharts

Package: pgcharts
Section: database
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: turn your PostgreSQL queries into charts
pgcharts is a little web application that takes as input an SQL query text
and outputs its data in one of the following forms: html table, column
chart, bar chart, pie chart, donut chart.
359 changes: 359 additions & 0 deletions debian/copyright

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions debian/pgcharts.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/bin
var/log
var/run
1 change: 1 addition & 0 deletions debian/pgcharts.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/bin/pgcharts /usr/bin
1 change: 1 addition & 0 deletions debian/pgcharts.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pgcharts.1
40 changes: 40 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/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

PKGVERS = $(shell dpkg-parsechangelog | awk -F '[:-]' '/^Version:/ { print substr($$2, 2) }')
EXCLUDE = --exclude-vcs --exclude=debian --exclude=build --exclude=.vagrant

orig: clean
cd .. && tar czf pgcharts_$(PKGVERS).orig.tar.gz $(EXCLUDE) pgcharts

override_dh_auto_build:
mkdir -p build/bin
buildapp --logfile /tmp/pgcharts-build.log \
--require sb-posix \
--load /usr/share/common-lisp/source/cl-asdf/build/asdf.lisp \
--asdf-path . \
--asdf-tree /usr/share/common-lisp/systems \
--load-system pgcharts \
--load src/image.lisp \
--load debian/settings.lisp \
--entry pgcharts:main \
--dynamic-space-size 4096 \
--compress-core \
--output build/bin/pgcharts

override_dh_auto_test:
# no nothing

override_dh_strip:
# do nothing

%:
dh $@
4 changes: 4 additions & 0 deletions debian/settings.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(in-package #:pgcharts)

(setf *pidfile* "~/.pgcharts.pid")
(setf *logfile* "~/.pgcharts.log")
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
4 changes: 4 additions & 0 deletions vm-conf/bashrc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# DEBIAN
export DEBEMAIL="[email protected]"
export DEBFULLNAME="Dimitri Fontaine"
export DEBSIGN_KEYID="60B1CB4E"
21 changes: 21 additions & 0 deletions vm-conf/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

if [ ! -f /etc/apt/sources.list.old ]
then
sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo cp /vagrant/conf/sources.list /etc/apt/sources.list
fi

sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install -y devscripts debhelper debianutils dh-lisp \
gnupg rsync

# build deps
sudo apt-get install sbcl buildapp cl-asdf cl-postmodern cl-esrap \
cl-py-configparser cl-split-sequence cl-ppcre cl-alexandria \
cl-hunchentoot cl-yason cl-closer-mop cl-daemon cl-who \
cl-bordeaux-threads cl-graph cl-trivial-backtrace \
ruby-ronn

cat /vagrant/conf/bashrc.sh >> ~/.bashrc
3 changes: 3 additions & 0 deletions vm-conf/devscripts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DEBEMAIL="[email protected]"
DEBFULLNAME="Dimitri Fontaine"
DEBSIGN_KEYID="60B1CB4E"
7 changes: 7 additions & 0 deletions vm-conf/gpg.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
default-key 60B1CB4E
keyserver hkp://keys.gnupg.net
use-agent

personal-digest-preferences SHA512
cert-digest-algo SHA512
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
5 changes: 5 additions & 0 deletions vm-conf/sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deb http://ftp.fr.debian.org/debian sid main non-free contrib
deb-src http://ftp.fr.debian.org/debian sid main non-free contrib

# deb http://security.debian.org/ wheezy/updates main contrib non-free
# deb-src http://security.debian.org/ wheezy/updates main contrib non-free

0 comments on commit 198ea9d

Please sign in to comment.