Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

debian packaging

  • Loading branch information...
commit d9f328ce4d62ffda48b271884561a7d7a97ade78 1 parent 88db262
dim authored
View
34 Makefile
@@ -1,4 +1,10 @@
-DOCS = pgloader.1.txt
+# $Id: Makefile,v 1.6 2007-11-29 21:30:22 dim Exp $
+#
+# Makefile for debian packaging purpose, make install not intended to work.
+
+DOCS = pgloader.1.txt
+CVSROOT = $(shell cat CVS/Root)
+VERSION = $(shell ./pgloader.py --version | cut -d' ' -f3)
# debian setting
DESTDIR =
@@ -11,8 +17,12 @@ examples = examples
libs = $(wildcard pgloader/*.py)
refm = $(wildcard reformat/*.py)
+DEBDIR = /tmp/pgloader
+EXPORT = $(DEBDIR)/export/pgloader
+ORIG = $(DEBDIR)/export/pgloader_$(VERSION).orig.tar.gz
+
install:
- install -m 755 $(pgloader) $(libdir)
+ install -m 755 $(pgloader) $(DESTDIR)/usr/bin/pgloader
install -m 755 -d $(libdir)/pgloader
install -m 755 -d $(libdir)/reformat
@@ -28,3 +38,23 @@ pgloader.1.xml: $(DOCS)
man: ${DOCS:.txt=.xml}
xmlto man $<
+
+deb:
+ # working copy from where to make the .orig archive
+ rm -rf $(DEBDIR)
+ mkdir -p $(DEBDIR)/pgloader
+ mkdir -p $(EXPORT)
+ cp -a . $(EXPORT)
+ for n in "*~" "*.pyc"; do \
+ find $(EXPORT) -name "$$n" -print0|xargs -0 rm -f; \
+ done
+ find $(EXPORT) -type d -name CVS -print0|xargs -0 rm -rf
+
+ # prepare the .orig without the debian/ packaging stuff
+ cp -a $(EXPORT) $(DEBDIR)
+ rm -rf $(DEBDIR)/pgloader/debian
+ (cd $(DEBDIR) && tar czf $(ORIG) pgloader)
+
+ # build the debian package and copy them to ..
+ (cd $(EXPORT) && debuild)
+ cp -a $(DEBDIR)/export/pgloader_$(VERSION)* ..
View
15 debian/control
@@ -9,13 +9,8 @@ Package: pgloader
Architecture: all
Depends: python (>=2.4.4), python-psycopg2 | python-psycopg (<< 1.1.21)
Description: loads flat data files into PostgreSQL
- pgloader imports data from a flat file and insert it into a database
- table. It uses a flat file per database table, and you can configure as
- many Sections as you want, each one associating a table name and a data
- file.
- .
- Data are parsed and rewritten, then given to PostgreSQL COPY command.
- Parsing is necessary for dealing with end of lines and eventual trailing
- separator characters, and for column reordering: your flat data file may
- not have the same column order as the databse table has.
-
+ pgloader imports data from flat files and insert it into a database
+ table. You have to provide a configuration file containing sections,
+ which each defines how to load a table. CSV and text format are
+ supported, the latter being able to parse multi-line non-quoted with
+ trailing delimiter quite CSV input, such as given by Informix UNLOAD.
View
2  debian/docs
@@ -1 +1 @@
-pgloader.1
+pgloader.1
View
2  debian/pgloader.links
@@ -1,2 +0,0 @@
-/usr/share/pgloader/pgloader.py /usr/bin/pgloader
-
View
2  debian/pgloader.manpages
@@ -1 +1 @@
-pgloader.1
+pgloader.1
View
2  debian/pycompat
@@ -1 +1 @@
-2
+2
View
2  debian/pyversions
@@ -1 +1 @@
-2.3-
+2.3-
View
11 debian/rules
@@ -29,25 +29,16 @@ configure-stamp:
build: build-stamp
+ $(MAKE) man
build-stamp: configure-stamp
dh_testdir
-
- # Add here commands to compile the package.
- #$(MAKE)
- #docbook-to-man pgloader.1.sgml > pgloader.1
- $(MAKE) man
-
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) clean
-
dh_clean
install: build
View
2  examples/clob/clob.data
@@ -4,4 +4,4 @@
4|59,15,clob.out
5|6e,13,clob.out
6|81,6,clob.out
-7|87,d,clob.out
+7|87,d,clob.out
View
2  examples/clob/clob.out
@@ -1 +1 @@
-This is some clob dataTo be used on several data entryReferences to those are to be foundIn the clob.data fileThey refer to beginlengthand filename.
+This is some clob dataTo be used on several data entryReferences to those are to be foundIn the clob.data fileThey refer to beginlengthand filename.
View
2  examples/clob/clob.sql
@@ -1,4 +1,4 @@
CREATE TABLE clob (
a integer primary key,
b text
-);
View
2  examples/cluttered/cluttered.data
@@ -13,4 +13,4 @@ escaping^just to test^
escaped value\
\
with empty line\
-embeded^last line^
+embeded^last line^
View
2  examples/cluttered/cluttered.sql
@@ -2,4 +2,4 @@ CREATE TABLE cluttered (
a integer primary key,
b text,
c text
-);
View
2  examples/csv/csv.sql
@@ -3,4 +3,4 @@ CREATE TABLE csv (
b bigint,
c char(2),
d text
-);
View
2  examples/errors/errors.data
@@ -4,4 +4,4 @@
4|\ |2006-16-4|
5|some fifth row text|2006-5-12|
6|some sixth row text|2006-13-10|
-7|some null date to play with||
+7|some null date to play with||
View
2  examples/errors/errors.sql
@@ -2,4 +2,4 @@ CREATE TABLE errors (
a integer primary key,
b date,
c text
-);
View
2  examples/partial/partial.sql
@@ -4,4 +4,4 @@ CREATE TABLE partial (
c text,
d text,
e text
-);
View
2  examples/reformat/reformat.sql
@@ -1,4 +1,4 @@
CREATE TABLE reformat (
id integer primary key,
timestamp timestamp
-);
View
2  examples/serial/serial.data
@@ -4,4 +4,4 @@ some third row text;2006-10-12
\ ;2006-10-4
some fifth row text;2006-5-12
some sixth row text;2006-7-10
-some null date to play with;
+some null date to play with;
View
2  examples/serial/serial.sql
@@ -2,4 +2,4 @@ CREATE TABLE serial (
a serial primary key,
b date,
c text
-);
View
2  examples/simple/simple.data
@@ -4,4 +4,4 @@
4|\ |2006-10-4|
5|some fifth row text|2006-5-12|
6|some sixth row text|10/7/6|
-7|some null date to play with||
+7|some null date to play with||
View
2  examples/simple/simple.sql
@@ -2,4 +2,4 @@ CREATE TABLE simple (
a integer primary key,
b date,
c text
-);
View
2  examples/udc/udc.sql
@@ -2,4 +2,4 @@ CREATE TABLE udc (
b integer primary key,
c text,
d integer
-);
View
2  pgloader.py
@@ -108,7 +108,7 @@ def parse_options():
(opts, args) = parser.parse_args()
if opts.version:
- print "PgLoader version %s" % pgloader.options.PGLOADER_VERSION
+ print "PGLoader version %s" % pgloader.options.PGLOADER_VERSION
sys.exit(0)
# check existence en read ability of config file
View
2  pgloader/options.py
@@ -2,7 +2,7 @@
#
# Some common options, for each module to get them
-PGLOADER_VERSION = '2.2.5-devel'
+PGLOADER_VERSION = '2.2.5~dev'
INPUT_ENCODING = None
PG_CLIENT_ENCODING = 'latin9'
Please sign in to comment.
Something went wrong with that request. Please try again.