From bce75fc4e5a3c0a5b00e1f29eb4b4ed2e272d272 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Wed, 30 Apr 2014 00:30:44 +0200 Subject: [PATCH] Proper debian packaging. This packaging requires all pgloader dependencies to be available as a debian package within the distribution, which is an work-in-progress happening concurrently to this patch. The current situation allows to actually build the pgloader package the proper way already, some more needs to happen before anybody can do that from a public debian repository. --- debian/cl-pgloader.dirs | 2 ++ debian/cl-pgloader.docs | 3 +++ debian/cl-pgloader.install | 3 +++ debian/cl-pgloader.links | 1 + debian/control | 19 ++++++++++++++++++- debian/pgloader.docs | 2 ++ debian/rules | 17 +++++++++++++++++ 7 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 debian/cl-pgloader.dirs create mode 100644 debian/cl-pgloader.docs create mode 100644 debian/cl-pgloader.install create mode 100644 debian/cl-pgloader.links create mode 100644 debian/pgloader.docs diff --git a/debian/cl-pgloader.dirs b/debian/cl-pgloader.dirs new file mode 100644 index 0000000..5591b54 --- /dev/null +++ b/debian/cl-pgloader.dirs @@ -0,0 +1,2 @@ +usr/share/common-lisp/source/pgloader +usr/share/common-lisp/systems diff --git a/debian/cl-pgloader.docs b/debian/cl-pgloader.docs new file mode 100644 index 0000000..3d29282 --- /dev/null +++ b/debian/cl-pgloader.docs @@ -0,0 +1,3 @@ +INSTALL.md +README.md +pgloader.1.md \ No newline at end of file diff --git a/debian/cl-pgloader.install b/debian/cl-pgloader.install new file mode 100644 index 0000000..a08e4f6 --- /dev/null +++ b/debian/cl-pgloader.install @@ -0,0 +1,3 @@ +pgloader.asd usr/share/common-lisp/source/simple-date +pgloader.lisp usr/share/common-lisp/source/pgloader +src usr/share/common-lisp/source/pgloader diff --git a/debian/cl-pgloader.links b/debian/cl-pgloader.links new file mode 100644 index 0000000..dfa6175 --- /dev/null +++ b/debian/cl-pgloader.links @@ -0,0 +1 @@ +usr/share/common-lisp/source/pgloader/pgloader.asd usr/share/common-lisp/systems/pgloader.asd \ No newline at end of file diff --git a/debian/control b/debian/control index 63d23e4..c15ea0a 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: pgloader Section: database Priority: extra Maintainer: Dimitri Fontaine -Build-Depends: debhelper (>= 8.0.0), sbcl (>= 1.1.13), pandoc, ruby-ronn +Build-Depends: debhelper (>= 8.0.0), sbcl (>= 1.1.13), ruby-ronn, buildapp (>= 1.5), cl-asdf (>= 3.0.3), cl-log, cl-postmodern, cl-qmynd, cl-split-sequence, cl-csv, cl-fad, cl-lparallel, cl-esrap, cl-alexandria, cl-drakma, cl-zip, cl-flexi-streams, cl-usocket, cl-local-time, cl-command-line-arguments, cl-abnf, cl-db3, cl-py-configparser, cl-sqlite, cl-trivial-backtrace, cl-markdown, cl-md5, cl-asdf-finalizers, cl-asdf-system-connections, cl-cffi (>= 1:0.12.0) Standards-Version: 3.9.3 Homepage: https://github.com/dimitri/pgloader Vcs-Git: https://github.com/dimitri/pgloader.git @@ -24,3 +24,20 @@ Description: extract, transform and load data into PostgreSQL is able to auto-discover the schema and create the tables and the indexes in PostgreSQL. In the MySQL case it's possible to edit CASTing rules from the pgloader command directly. + +Package: cl-pgloader +Architecture: all +Depends: ${shlibs:Depends}, cl-asdf (>= 3.0.3), cl-log, cl-postmodern, cl-qmynd, cl-split-sequence, cl-csv, cl-fad, cl-lparallel, cl-esrap, cl-alexandria, cl-drakma, cl-zip, cl-flexi-streams, cl-usocket, cl-local-time, cl-command-line-arguments, cl-abnf, cl-db3, cl-py-configparser, cl-sqlite, cl-trivial-backtrace, cl-markdown, cl-md5, cl-asdf-finalizers, cl-asdf-system-connections, cl-cffi (>= 1:0.12.0) +Description: extract, transform and load data into PostgreSQL + pgloader imports data from different kind of sources and COPY it into + PostgreSQL. + . + The command language is described in the manual page and allows to describe + where to find the data source, its format, and to describe data processing + and transformation. + . + Supported source formats include CSV, fixed width flat files, dBase3 files + (DBF), and SQLite and MySQL databases. In most of those formats, pgloader + is able to auto-discover the schema and create the tables and the indexes + in PostgreSQL. In the MySQL case it's possible to edit CASTing rules from + the pgloader command directly. diff --git a/debian/pgloader.docs b/debian/pgloader.docs new file mode 100644 index 0000000..e2eb33c --- /dev/null +++ b/debian/pgloader.docs @@ -0,0 +1,2 @@ +README.md +pgloader.1.md \ No newline at end of file diff --git a/debian/rules b/debian/rules index 161f4ea..bb1d25a 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,23 @@ EXCLUDE = --exclude-vcs --exclude=debian --exclude=build orig: clean cd .. && tar czf pgloader_$(PKGVERS).orig.tar.gz $(EXCLUDE) pgloader +override_dh_auto_build: + make docs + buildapp --logfile /tmp/pgloader-build.log \ + --require sb-posix \ + --require sb-bsd-sockets \ + --asdf-path . \ + --asdf-tree /usr/share/common-lisp/systems \ + --load-system asdf \ + --load-system asdf-finalizers \ + --load-system asdf-system-connections \ + --load-system pgloader \ + --load src/hooks.lisp \ + --entry pgloader:main \ + --dynamic-space-size 4096 \ + --compress-core \ + --output build/bin/pgloader + override_dh_auto_test: # do nothing