Debianization:
authorJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Fri, 14 Mar 2008 23:03:28 +0000 (23:03 +0000)
committerJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Fri, 14 Mar 2008 23:03:28 +0000 (23:03 +0000)
 * created debian/ files
 * removed extension from scripts

ccoop-atomize [new file with mode: 0755]
ccoop-atomize.py [deleted file]
ccoop-update [new file with mode: 0755]
ccoop-update.sh [deleted file]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/install [new file with mode: 0644]
debian/rules [new file with mode: 0755]

diff --git a/ccoop-atomize b/ccoop-atomize
new file mode 100755 (executable)
index 0000000..d39b3bb
--- /dev/null
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+import sys, os,datetime
+
+account=sys.argv[1]
+name=sys.argv[2]
+balance=sys.argv[3]
+
+lines = file(os.path.join(os.getenv("CCPATH"), account+".csv")).readlines()
+nlines = len(lines)
+
+print '<?xml version="1.0" encoding="UTF-8"?>'
+print '<feed xmlns="http://www.w3.org/2005/Atom">'
+print "<id>tag:nirgal.com,2000:ccoop/"+account+"</id>"
+print "<title>"+name+" "+account+"</title>"
+print '<subtitle type="text">Balance: '+balance+'</subtitle>'
+print "<updated>"+datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")+"</updated>"
+iline = 0
+for line in lines:
+    line = line[:-1]
+    iline+=1
+    if not line:
+        continue
+    date,libel1,libel2,amount,sign,checkid = line.split(';')
+    date=date[6:]+"-"+date[3:5]+"-"+date[0:2]
+    libel1=libel1.strip()
+    libel2=libel2.strip()
+    amount=amount.strip()
+    sign=sign.strip()
+    print "<entry>"
+    print "   <id>"+str(nlines-iline)+"</id>"
+    print "   <updated>"+date+"</updated>"
+    print "   <title>"+libel1+"</title>"
+    print "   <content type='text'>"
+    print "      "+libel1
+    print "      "+libel2
+    print "      "+sign
+    print "      "+amount
+    print "      "+checkid
+    print "   </content>"
+    print "</entry>"
+
+print "</feed>"
diff --git a/ccoop-atomize.py b/ccoop-atomize.py
deleted file mode 100755 (executable)
index d39b3bb..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-
-import sys, os,datetime
-
-account=sys.argv[1]
-name=sys.argv[2]
-balance=sys.argv[3]
-
-lines = file(os.path.join(os.getenv("CCPATH"), account+".csv")).readlines()
-nlines = len(lines)
-
-print '<?xml version="1.0" encoding="UTF-8"?>'
-print '<feed xmlns="http://www.w3.org/2005/Atom">'
-print "<id>tag:nirgal.com,2000:ccoop/"+account+"</id>"
-print "<title>"+name+" "+account+"</title>"
-print '<subtitle type="text">Balance: '+balance+'</subtitle>'
-print "<updated>"+datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")+"</updated>"
-iline = 0
-for line in lines:
-    line = line[:-1]
-    iline+=1
-    if not line:
-        continue
-    date,libel1,libel2,amount,sign,checkid = line.split(';')
-    date=date[6:]+"-"+date[3:5]+"-"+date[0:2]
-    libel1=libel1.strip()
-    libel2=libel2.strip()
-    amount=amount.strip()
-    sign=sign.strip()
-    print "<entry>"
-    print "   <id>"+str(nlines-iline)+"</id>"
-    print "   <updated>"+date+"</updated>"
-    print "   <title>"+libel1+"</title>"
-    print "   <content type='text'>"
-    print "      "+libel1
-    print "      "+libel2
-    print "      "+sign
-    print "      "+amount
-    print "      "+checkid
-    print "   </content>"
-    print "</entry>"
-
-print "</feed>"
diff --git a/ccoop-update b/ccoop-update
new file mode 100755 (executable)
index 0000000..66ed597
--- /dev/null
@@ -0,0 +1,244 @@
+#!/usr/bin/env bash
+#
+# Crédit Coopératif account tools
+#
+# It fetch csv file and merge them to previous ones
+# It also generates a local file suitable for a feed reader
+#
+# Depends on wget, iconv
+
+set -e
+
+export CCPATH=~/ccoop
+LOGFILE=$CCPATH/coop.log # unsued unless --log option is used
+COOKIEJAR=$CCPATH/cookiejar # cookies, deleted on exit
+TMP=$CCPATH/lastpage.html # last html page, deleted on exit
+
+function parsearg() {
+    _OPT="${1%=?*}"
+    _VAL="${1#?*=}"
+}
+
+function usage() {
+    #echo $'\n' $@ $'\n'
+    echo "Usage: ccoop-update [options]"
+    echo "  -h|--help             Display that help"
+    echo "  -q|--quiet            Don't display informationnal messages"
+    echo "  --log                 Log everything to $LOGFILE"
+    echo "  --config              Setup a config file and install cron entry"
+    echo "  --unconfig            Remove config file and remove cron entry"
+    #echo "  --target=<filename>  Set target filename. Defaults to $target_file"
+    #echo "See man ccoop-update(1) for documentation."
+}
+
+for arg in "$@"; do
+    parsearg $arg
+
+    case $_OPT in
+    -q|--quiet)
+        quiet=1
+        continue
+    ;;
+    --log)
+        log=1
+        continue
+    ;;
+    --config)
+        isconfig=1
+        continue
+    ;;
+    --unconfig)
+        isunconfig=1
+        continue
+    ;;
+    -h|--help)
+        usage 
+        exit 0
+    ;;
+    #--target)
+    #    target_file=$_VAL
+    #    continue
+    #;;
+    *)
+        echo "Unknown option $_OPT"
+        usage
+        exit 22
+    ;;
+    esac
+done
+
+# That function prints messages to stderr, unless quiet is set
+# It logs into $LOGFILE if log is set, no matter whether quiet is set or not
+function inform() {
+    if [ -n "$quiet" ]; then
+        if [ -n "$log" ]; then
+            echo $@ >> $LOGFILE >&2
+        fi
+    else # not quiet
+        if [ -n "$log" ]; then
+            echo $@ | tee -a $LOGFILE >&2
+        else
+            echo $@ >&2
+        fi
+    fi
+}
+
+function fetch() {
+    wget -q --load-cookies $COOKIEJAR --save-cookies $COOKIEJAR --keep-session-cookies $@ -O - | iconv -f ISO-8859-1 -t UTF-8 > $TMP
+    if [ -n "$log" ]; then
+        cat $TMP >> $LOGFILE
+    fi
+}
+
+function doconfig() {
+    read -p "Coopanet login: " COOPLOGIN
+    read -p "Coopanet password: " -s COOPPASSWORD
+    mkdir -p $CCPATH
+    echo "# coopanet configuration">$CCPATH/config
+    echo "COOPLOGIN=$COOPLOGIN">>$CCPATH/config
+    echo "COOPPASSWORD=$COOPPASSWORD">>$CCPATH/config
+    echo >&2
+    echo "config writen to $CCPATH/config" >&2
+    crontab -l | grep -v ccoop-update || echo "$(($RANDOM%60)) 6     * * *   $PWD/`dirname $0`/ccoop-update -q" | crontab -
+    echo "crontab installed" >&2
+}
+
+function dounconfig() {
+    local ok
+    if [[ -e $CCPATH/config ]]; then
+        rm -f $CCPATH/config
+        echo "$CCPATH/config deleted">&2
+        ok=1
+    fi
+    if crontab -l | grep -q ccoop-update ; then
+        crontab -l | grep -v ccoop-update | crontab -
+        echo "crontab uninstalled" >&2
+        ok=1
+    fi
+    if [[ -z "$ok" ]]; then
+        echo "Allready uninstalled." >&2
+    fi
+    if [[ -e "$CCPATH" ]]; then
+        echo "Password cleared. Remove ~/ccoop manually if you want to erase history." >&2
+    fi
+    exit 0
+}
+
+function fetchall() {
+    echo> $COOKIEJAR
+    if [[ -n "$log" ]]; then
+        echo> $LOGFILE
+    fi
+    
+    inform "WGET login form"
+    fetch https://www.coopanet.com/banque/cpt/
+    
+    inform "WGET bql/connexion.do"
+    fetch "--post-data=site=C&codeUtil=$COOPLOGIN&motPasse=$COOPPASSWORD&pbValider=Valider" https://www.coopanet.com/banque/cpt/bql/connexion.do
+    
+    inform "WGET cpt/connexion.do"
+    fetch https://www.coopanet.com/banque/cpt/cpt/connexion.do
+    if grep -q "Vous venez de quitter  COOP@NET" $TMP; then
+        echo "Can't log in. Check password" >&2
+    fi
+
+    IFS=$'\n'
+    accountsId=(`grep numeroExterne $TMP | grep hidden | cut -d \" -f 6`)
+    accountsNames=(`grep "<td style=\"width:9%;\">" $TMP | cut -d ">" -f 2 | cut -d "<" -f 1`)
+    accountsBalances=(`grep "Consulter votre relevé" $TMP | cut -d ">" -f 3 | cut -d "<" -f 1`)
+    unset IFS
+
+    for idx in ${!accountsId[@]}; do
+        account=${accountsId[$idx]}
+        name=${accountsNames[$idx]}
+        balance=${accountsBalances[$idx]}
+        inform "$name $account $balance"
+    
+        inform "WGET situationcomptes.do"
+        fetch "--post-data=numeroExterne=$account&typeAction=2&btAction=OK" https://www.coopanet.com/banque/cpt/cpt/situationcomptes.do
+        
+        dateFin=`grep dateFin $TMP | cut -d \" -f 10`
+        inform "WGET selectiontelechargement.do"
+        fetch "--post-data=format=3&dateDebut=01/01/2001&dateFin=$dateFin&btValider=Valider" https://www.coopanet.com/banque/cpt/cpt/selectiontelechargement.do
+    
+        inform "WGET telechargement.do"
+        ppath=`grep path $TMP | cut -d \" -f 6`
+        fetch "--post-data=path=$ppath&zip=2&btConfirmer=Confirmer" https://www.coopanet.com/banque/cpt/cpt/telechargement.do
+        tail -n +2 $TMP > $CCPATH/$account.`date +%Y%m%d`.csv
+        rm -f $CCPATH/$account.last.csv
+        ln -s $CCPATH/$account.`date +%Y%m%d`.csv $CCPATH/$account.last.csv
+    done
+    
+    # logout
+    inform "WGET reconnect.do"
+    fetch https://www.coopanet.com/banque/cpt/communs/reconnect.do
+    
+    # delete tmp files
+    rm -f $COOKIEJAR $TMP
+}
+
+
+# That function updates $account.csv files, adding the latest missing entries
+# It dumps on stdout the new lines
+function updatehistory() {
+    inform "Updating complete csv files"
+    # merge values in $account.csv
+    for idx in ${!accountsId[@]}; do
+        account=${accountsId[$idx]}
+        name=${accountsNames[$idx]}
+        balance=${accountsBalances[$idx]}
+
+        # get new lines into $account.new.csv
+        diff -Nau $CCPATH/$account.last.csv $CCPATH/$account.csv | grep "^-" | grep -v "^---" | cut -c 2- > $CCPATH/$account.new.csv
+    
+        # print new entries
+        cat $CCPATH/$account.new.csv
+    
+        cat $CCPATH/$account.csv >>$CCPATH/$account.new.csv
+        mv $CCPATH/$account.new.csv $CCPATH/$account.csv
+    done
+}
+
+function atomize() {
+    inform "Updating feeds"
+    for idx in ${!accountsId[@]}; do
+        account=${accountsId[$idx]}
+        name=${accountsNames[$idx]}
+        balance=${accountsBalances[$idx]}
+
+        "`dirname $0`/ccoop-atomize" "$account" "$name" "$balance" > $CCPATH/$account.atom
+    done
+}
+
+
+umask 0077 # make sure the generated files are only readable by the user
+
+if [[ -n $isconfig ]]; then
+    doconfig
+fi
+if [[ -n $isunconfig ]]; then
+    dounconfig
+fi
+
+# Make sure our temporary files are deleted on error and on exit
+trap "rm -f $COOKIEJAR $TMP; exit" INT TERM EXIT
+
+if [[ ! -r $CCPATH/config ]]; then
+    echo "Use '$0 --config'"
+    exit 1
+fi
+if [[ `ls -l $CCPATH/config | cut -c 8-10` != "---" ]]; then
+    echo "Security warning: config file should be chmod o-rwx" >&2
+fi
+source $CCPATH/config
+
+if [[ -n $log ]]; then
+    inform "Warning, $LOGFILE will contain sensitive information. You should delete it."
+fi
+
+
+fetchall
+updatehistory
+atomize
+
diff --git a/ccoop-update.sh b/ccoop-update.sh
deleted file mode 100755 (executable)
index 4268054..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-#!/usr/bin/env bash
-#
-# Crédit Coopératif account tools
-#
-# It fetch csv file and merge them to previous ones
-# It also generates a local file suitable for a feed reader
-#
-# Depends on wget, iconv
-
-set -e
-
-export CCPATH=~/ccoop
-LOGFILE=$CCPATH/coop.log # unsued unless --log option is used
-COOKIEJAR=$CCPATH/cookiejar # cookies, deleted on exit
-TMP=$CCPATH/lastpage.html # last html page, deleted on exit
-
-function parsearg() {
-    _OPT="${1%=?*}"
-    _VAL="${1#?*=}"
-}
-
-function usage() {
-    #echo $'\n' $@ $'\n'
-    echo "Usage: ccoop.sh [options]"
-    echo "  -h|--help             Display that help"
-    echo "  -q|--quiet            Don't display informationnal messages"
-    echo "  --log                 Log everything to $LOGFILE"
-    echo "  --config              Setup a config file and install cron entry"
-    echo "  --unconfig            Remove config file and remove cron entry"
-    #echo "  --target=<filename>  Set target filename. Defaults to $target_file"
-    #echo "See man ccoop.sh(1) for documentation."
-}
-
-for arg in "$@"; do
-    parsearg $arg
-
-    case $_OPT in
-    -q|--quiet)
-        quiet=1
-        continue
-    ;;
-    --log)
-        log=1
-        continue
-    ;;
-    --config)
-        isconfig=1
-        continue
-    ;;
-    --unconfig)
-        isunconfig=1
-        continue
-    ;;
-    -h|--help)
-        usage 
-        exit 0
-    ;;
-    #--target)
-    #    target_file=$_VAL
-    #    continue
-    #;;
-    *)
-        echo "Unknown option $_OPT"
-        usage
-        exit 22
-    ;;
-    esac
-done
-
-# That function prints messages to stderr, unless quiet is set
-# It logs into $LOGFILE if log is set, no matter whether quiet is set or not
-function inform() {
-    if [ -n "$quiet" ]; then
-        if [ -n "$log" ]; then
-            echo $@ >> $LOGFILE >&2
-        fi
-    else # not quiet
-        if [ -n "$log" ]; then
-            echo $@ | tee -a $LOGFILE >&2
-        else
-            echo $@ >&2
-        fi
-    fi
-}
-
-function fetch() {
-    wget -q --load-cookies $COOKIEJAR --save-cookies $COOKIEJAR --keep-session-cookies $@ -O - | iconv -f ISO-8859-1 -t UTF-8 > $TMP
-    if [ -n "$log" ]; then
-        cat $TMP >> $LOGFILE
-    fi
-}
-
-function doconfig() {
-    read -p "Coopanet login: " COOPLOGIN
-    read -p "Coopanet password: " -s COOPPASSWORD
-    echo "# coopanet configuration">$CCPATH/config
-    echo "COOPLOGIN=$COOPLOGIN">>$CCPATH/config
-    echo "COOPPASSWORD=$COOPPASSWORD">>$CCPATH/config
-    echo >&2
-    echo "config writen to $CCPATH/config" >&2
-    crontab -l | grep -v ccoop-update.sh || echo "$(($RANDOM%60)) 6     * * *   $PWD/`dirname $0`/ccoop-update.sh -q" | crontab -
-    echo "crontab installed" >&2
-}
-
-function dounconfig() {
-    local ok
-    if [[ -e $CCPATH/config ]]; then
-        rm -f $CCPATH/config
-        echo "$CCPATH/config deleted">&2
-        ok=1
-    fi
-    if crontab -l | grep -q ccoop-update.sh ; then
-        crontab -l | grep -v ccoop-update.sh | crontab -
-        echo "crontab uninstalled" >&2
-        ok=1
-    fi
-    if [[ -z "$ok" ]]; then
-        echo "Allready uninstalled." >&2
-    fi
-    exit 0
-}
-
-function fetchall() {
-    echo> $COOKIEJAR
-    if [[ -n "$log" ]]; then
-        echo> $LOGFILE
-    fi
-    
-    inform "WGET login form"
-    fetch https://www.coopanet.com/banque/cpt/
-    
-    inform "WGET bql/connexion.do"
-    fetch "--post-data=site=C&codeUtil=$COOPLOGIN&motPasse=$COOPPASSWORD&pbValider=Valider" https://www.coopanet.com/banque/cpt/bql/connexion.do
-    
-    inform "WGET cpt/connexion.do"
-    fetch https://www.coopanet.com/banque/cpt/cpt/connexion.do
-    if grep -q "Vous venez de quitter  COOP@NET" $TMP; then
-        echo "Can't log in. Check password" >&2
-    fi
-
-    IFS=$'\n'
-    accountsId=(`grep numeroExterne $TMP | grep hidden | cut -d \" -f 6`)
-    accountsNames=(`grep "<td style=\"width:9%;\">" $TMP | cut -d ">" -f 2 | cut -d "<" -f 1`)
-    accountsBalances=(`grep "Consulter votre relevé" $TMP | cut -d ">" -f 3 | cut -d "<" -f 1`)
-    unset IFS
-
-    for idx in ${!accountsId[@]}; do
-        account=${accountsId[$idx]}
-        name=${accountsNames[$idx]}
-        balance=${accountsBalances[$idx]}
-        inform "$name $account $balance"
-    
-        inform "WGET situationcomptes.do"
-        fetch "--post-data=numeroExterne=$account&typeAction=2&btAction=OK" https://www.coopanet.com/banque/cpt/cpt/situationcomptes.do
-        
-        dateFin=`grep dateFin $TMP | cut -d \" -f 10`
-        inform "WGET selectiontelechargement.do"
-        fetch "--post-data=format=3&dateDebut=01/01/2001&dateFin=$dateFin&btValider=Valider" https://www.coopanet.com/banque/cpt/cpt/selectiontelechargement.do
-    
-        inform "WGET telechargement.do"
-        ppath=`grep path $TMP | cut -d \" -f 6`
-        fetch "--post-data=path=$ppath&zip=2&btConfirmer=Confirmer" https://www.coopanet.com/banque/cpt/cpt/telechargement.do
-        tail -n +2 $TMP > $CCPATH/$account.`date +%Y%m%d`.csv
-        rm -f $CCPATH/$account.last.csv
-        ln -s $CCPATH/$account.`date +%Y%m%d`.csv $CCPATH/$account.last.csv
-    done
-    
-    # logout
-    inform "WGET reconnect.do"
-    fetch https://www.coopanet.com/banque/cpt/communs/reconnect.do
-    
-    # delete tmp files
-    rm -f $COOKIEJAR $TMP
-}
-
-
-# That function updates $account.csv files, adding the latest missing entries
-# It dumps on stdout the new lines
-function updatehistory() {
-    inform "Updating complete csv files"
-    # merge values in $account.csv
-    for idx in ${!accountsId[@]}; do
-        account=${accountsId[$idx]}
-        name=${accountsNames[$idx]}
-        balance=${accountsBalances[$idx]}
-
-        # get new lines into $account.new.csv
-        diff -Nau $CCPATH/$account.last.csv $CCPATH/$account.csv | grep "^-" | grep -v "^---" | cut -c 2- > $CCPATH/$account.new.csv
-    
-        # print new entries
-        cat $CCPATH/$account.new.csv
-    
-        cat $CCPATH/$account.csv >>$CCPATH/$account.new.csv
-        mv $CCPATH/$account.new.csv $CCPATH/$account.csv
-    done
-}
-
-function atomize() {
-    inform "Updating feeds"
-    for idx in ${!accountsId[@]}; do
-        account=${accountsId[$idx]}
-        name=${accountsNames[$idx]}
-        balance=${accountsBalances[$idx]}
-
-        "`dirname $0`/ccoop-atomize.py" "$account" "$name" "$balance" > $CCPATH/$account.atom
-    done
-}
-
-
-umask 0077 # make sure the generated files are only readable by the user
-
-if [[ -n $isconfig ]]; then
-    doconfig
-fi
-if [[ -n $isunconfig ]]; then
-    dounconfig
-fi
-
-# Make sure our temporary files are deleted on error and on exit
-trap "rm -f $COOKIEJAR $TMP; exit" INT TERM EXIT
-
-if [[ ! -r $CCPATH/config ]]; then
-    echo "Use '$0 --config'"
-    exit 1
-fi
-if [[ `ls -l $CCPATH/config | cut -c 8-10` != "---" ]]; then
-    echo "Security warning: config file should be chmod o-rwx" >&2
-fi
-source $CCPATH/config
-
-if [[ -n $log ]]; then
-    inform "Warning, $LOGFILE will contain sensitive information. You should delete it."
-fi
-
-
-fetchall
-updatehistory
-atomize
-
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..84bfa88
--- /dev/null
@@ -0,0 +1,5 @@
+ccoop (0.1) UNRELEASED; urgency=low
+
+  * Initial release.
+
+ -- Jean-Michel Vourgère <jmv_deb@nirgal.com>  Fri, 14 Mar 2008 23:29:13 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..a3f3cb0
--- /dev/null
@@ -0,0 +1,16 @@
+Source: ccoop
+Section: misc
+Priority: optional
+Maintainer: Jean-Michel Vourgère <jmv_deb@nirgal.com>
+Build-Depends: debhelper (>> 3.0.0)
+Standards-Version: 3.7.3
+
+Package: ccoop
+Section: misc
+Architecture: all
+Depends: python
+Suggests: liferea
+Description: Tools for accounts at bank Crédit Coopératif
+ That tool daily fetch a csv file via https from coopanet web site and merges
+ it to previous ones so that history is kept.
+ It also build a local syndication file suitable for a feed reader.
diff --git a/debian/install b/debian/install
new file mode 100644 (file)
index 0000000..101e4b1
--- /dev/null
@@ -0,0 +1,2 @@
+/ccoop-update /usr/bin/
+/ccoop-atomize /usr/bin/
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..aaac94e
--- /dev/null
@@ -0,0 +1,79 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+#CFLAGS = -g
+#ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+#      CFLAGS += -O0
+#else
+#      CFLAGS += -O2
+#endif
+
+build: build-stamp
+build-stamp:
+       dh_testdir
+
+       # Add here commands to compile the package.
+       #-$(MAKE)
+       #docbook-to-man debian/gentoo.sgml > gentoo.1
+
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp
+
+       # Add here commands to clean up after the build process.
+       #$(MAKE) clean
+
+       dh_clean
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+       
+       # Add here commands to install the package into debian/curcy.
+       #$(MAKE) install DESTDIR=$(CURDIR)/debian/curcy
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_install -X.svn
+#      dh_installdebconf
+       dh_installdocs
+       dh_installexamples
+       dh_installmenu
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_installinit
+#      dh_installcron
+#      dh_installman man/*
+       dh_installinfo
+       dh_installchangelogs
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_makeshlibs
+       dh_installdeb
+#      dh_perl
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install