Add Debian packaging

This commit is contained in:
Grégory Soutadé 2011-03-06 17:20:42 +01:00
parent 7f08ad06ea
commit 6a20953757
22 changed files with 100 additions and 50 deletions

View File

@ -1,4 +1,4 @@
v0.2_dev (19/02/2011) v0.2 (06/03/2011)
** User ** ** User **
Better use of sizers (so better interface!) Better use of sizers (so better interface!)
@ -13,6 +13,7 @@ v0.2_dev (19/02/2011)
Default categories in native language (even if switching language at runtime) Default categories in native language (even if switching language at runtime)
Add Real mode Add Real mode
Database is now at ~/.kisscount/kc.bdd Database is now at ~/.kisscount/kc.bdd
Add Debian's packages !!
** Dev ** ** Dev **
Use a factory to create panels (prepare for plug-in) Use a factory to create panels (prepare for plug-in)

View File

@ -26,9 +26,9 @@ cd -
** Compilation of KissCount ** ** Compilation of KissCount **
make clean
make make
sudo make install
** Execution ** ** Execution **
export LD_LIBRARY_PATH=$PWD/lib/freechart/lib:$PWD/lib/wxsqlite3-1.9.9/lib/ kc
./kc

View File

@ -1,6 +1,14 @@
LIB_DIR=$(DESTDIR)"/usr/lib/kisscount/"
SHARE_DIR=$(DESTDIR)"/usr/share/kisscount/"
DOC_DIR=$(DESTDIR)"/usr/share/doc/kisscount/"
BIN_DIR=$(DESTDIR)"/usr/bin/"
CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb
CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include
CXXFLAGS+=-I./lib/freechart/include CXXFLAGS+=-I./lib/freechart/include
CXXFLAGS+=-Wl,--rpath,"$(LIB_DIR)"
CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\""
#CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\""
LDFLAGS+=`wx-config --libs` LDFLAGS+=`wx-config --libs`
ifdef WIN32 ifdef WIN32
@ -51,11 +59,11 @@ package:
endif endif
install: install:
mkdir -p $(DESTDIR)/usr/lib/kisscount/ mkdir -p $(LIB_DIR) $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR)
mkdir -p $(DESTDIR)/usr/bin cp kc $(BIN_DIR)
cp kc $(DESTDIR)/usr/lib/kisscount/ cp -rf lib/*.so* $(LIB_DIR)
cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* $(DESTDIR)/usr/lib/kisscount/ cp -rf ressources/* $(SHARE_DIR)
cp tools/launch_kc.sh $(DESTDIR)/usr/lib/kisscount/ cp -rf README* ChangeLog CONTRIBUTORS COPYING TODO $(DOC_DIR)
cp -r ressources $(DESTDIR)/usr/lib/kisscount/
cp init.sql $(DESTDIR)/usr/lib/kisscount/ remove:
ln -s $(DESTDIR)/usr/lib/kisscount/launch_kc.sh $(DESTDIR)/usr/bin/kc rm -rf $(LIB_DIR) $(SHARE_DIR) $(DOC_DIR) $(BIN_DIR)/kc

2
README
View File

@ -1,6 +1,6 @@
KissCount is personnal account software delivered under GPL v3 licence terms. KissCount is personnal account software delivered under GPL v3 licence terms.
Current version is 0.1 Current version is 0.2
wxWidgets 2.8 and sqlite3 are needed wxWidgets 2.8 and sqlite3 are needed

View File

@ -1,6 +1,6 @@
KissCount est un logiciel de gestion de comptes personnels délivré sous licence GPL v3 KissCount est un logiciel de gestion de comptes personnels délivré sous licence GPL v3
La version actuelle est 0.1 La version actuelle est 0.2
wxWidgets 2.8 et sqlite3 sont nécessaires wxWidgets 2.8 et sqlite3 sont nécessaires

2
TODO
View File

@ -5,7 +5,6 @@ Auto completion (already up into wxwidgets 2.9)
Using tabulation to navigate throw interface (Search Panel) Using tabulation to navigate throw interface (Search Panel)
Can type a letter with a comboboxes Can type a letter with a comboboxes
Windows version Windows version
Need packaging (.deb)
Real mode Real mode
Choosing accounts & categories position Choosing accounts & categories position
@ -14,6 +13,7 @@ Database auto saving at startup
Use caches for created panels (avoid destroying/creating panels for nothing) Use caches for created panels (avoid destroying/creating panels for nothing)
Add search function to web view Add search function to web view
Need optimizations by caching operations and categories (using hastables) Need optimizations by caching operations and categories (using hastables)
Packaging for more distributions
=============================================================== ===============================================================
Next version Next version

24
debian/Makefile vendored
View File

@ -1,6 +1,14 @@
LIB_DIR=$(DESTDIR)"/usr/lib/kisscount/"
SHARE_DIR=$(DESTDIR)"/usr/share/kisscount/"
DOC_DIR=$(DESTDIR)"/usr/share/doc/kisscount/"
BIN_DIR=$(DESTDIR)"/usr/bin/"
CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb CXXFLAGS+=`wx-config --cxxflags` -Wall -Isrc -ggdb
CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include
CXXFLAGS+=-I./lib/freechart/include CXXFLAGS+=-I./lib/freechart/include
CXXFLAGS+=-Wl,--rpath,"$(LIB_DIR)"
CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\""
#CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\""
LDFLAGS+=`wx-config --libs` LDFLAGS+=`wx-config --libs`
ifdef WIN32 ifdef WIN32
@ -54,11 +62,11 @@ package:
endif endif
install: install:
mkdir -p $(DESTDIR)/usr/lib/kisscount/ mkdir -p $(LIB_DIR) $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR)
mkdir -p $(DESTDIR)/usr/bin cp kc $(BIN_DIR)
cp kc $(DESTDIR)/usr/lib/kisscount/ cp -rf lib/*.so* $(LIB_DIR)
cp -r ressources $(DESTDIR)/usr/lib/kisscount/ cp -rf ressources/* $(SHARE_DIR)
cp -r lib/*.so* $(DESTDIR)/usr/lib/kisscount/ cp -rf README* ChangeLog CONTRIBUTORS TODO $(DOC_DIR)
cp tools/launch_kc.sh $(DESTDIR)/usr/lib/kisscount/
cp init.sql $(DESTDIR)/usr/lib/kisscount/ remove:
ln -s $(DESTDIR)/usr/lib/kisscount/launch_kc.sh $(DESTDIR)/usr/bin/kc rm -rf $(LIB_DIR) $(SHARE_DIR) $(DOC_DIR) $(BIN_DIR)/kc

8
debian/control vendored
View File

@ -5,12 +5,12 @@ Maintainer: Grégory Soutadé <soutade@gmail.com>
Build-Depends: debhelper (>= 7.0.50~), libsqlite3-dev, libwxgtk2.8-dev (>= 2.8.10) Build-Depends: debhelper (>= 7.0.50~), libsqlite3-dev, libwxgtk2.8-dev (>= 2.8.10)
Standards-Version: 3.9.1 Standards-Version: 3.9.1
Homepage: http://indefero.soutade.fr/p/kisscount/ Homepage: http://indefero.soutade.fr/p/kisscount/
#Vcs-Git: git://git.debian.org/collab-maint/kisscount.git Vcs-Git: git://soutade.fr/kisscount.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/kisscount.git;a=summary Vcs-Browser: http://indefero.soutade.fr/p/kisscount/source/tree/master/
Package: kisscount Package: kisscount
Architecture: amd64 Architecture: any
Depends: ${misc:Depends} Depends: ${shlibs:Depends} ${misc:Depends}
Description: Personal accounting software Description: Personal accounting software
KissCount is a personal accounting software. KissCount is a personal accounting software.
It focuses on simplicity and everyday It focuses on simplicity and everyday

1
debian/dirs vendored
View File

@ -1 +0,0 @@
/usr/lib/kisscount

3
debian/docs vendored
View File

@ -1,2 +1,5 @@
README README
README.fr README.fr
ChangeLog
TODO
CONTRIBUTORS

1
debian/files vendored
View File

@ -1 +0,0 @@
kisscount_0.2-1_amd64.deb misc extra

View File

@ -1 +0,0 @@
usr/bin/kc

1
debian/kisscount.manpages vendored Normal file
View File

@ -0,0 +1 @@
kc.1

1
debian/rules vendored
View File

@ -25,4 +25,3 @@ export DH_VERBOSE=1
# install: # install:
# $(MAKE) install DESTDIR=$(CURDIR)/debian/kisscount/ # $(MAKE) install DESTDIR=$(CURDIR)/debian/kisscount/
override_dh_shlibdeps:

35
kc.1 Normal file
View File

@ -0,0 +1,35 @@
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH KC 1 "February 26, 2011"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
KissCount \- Personal Accounting Software
.SH SYNOPSIS
.B kc
.RI [ bdd_file ]
.SH DESCRIPTION
KissCount is a personal accounting software. Its goal is to be as simple as possible (matching KISS philosophy).
.br
It focuses on PERSONAL accounting (not companies/associations). You only have to enter operations and see what you have (or not).
.TP
.B bdd_file
Choose another database file than ~/.kisscount/kc.bdd
.SH FILES
Default database is ~/.kisscount/kc.bdd
.SH AUTHOR
KissCount was written by <Grégory Soutadé>.
.PP
This manual page was written by Grégory Soutadé <soutade@gmail.com>,

0
init.sql → ressources/init.sql Executable file → Normal file
View File

View File

@ -36,7 +36,7 @@
#define DATABASE_VERSION 2 #define DATABASE_VERSION 2
#define BDD_FILE "/.kisscount/kc.bdd" #define BDD_FILE "/.kisscount/kc.bdd"
#define INIT_SCRIPT "init.sql" #define INIT_SCRIPT RESSOURCES_ROOT "init.sql"
#define FIX_OP (1 << 0) #define FIX_OP (1 << 0)
#define NON_FIX_OP (1 << 1) #define NON_FIX_OP (1 << 1)

View File

@ -29,7 +29,7 @@ typedef struct {
} language ; } language ;
#define NB_SUPPORTED_LANGUAGES 2 #define NB_SUPPORTED_LANGUAGES 2
#define ICONS_PATH "./ressources/icons" #define ICONS_PATH RESSOURCES_ROOT "icons/"
extern language languages[NB_SUPPORTED_LANGUAGES]; extern language languages[NB_SUPPORTED_LANGUAGES];

View File

@ -28,15 +28,17 @@
#define DEFAULT_FONT_SIZE 12 #define DEFAULT_FONT_SIZE 12
#define DEFAULT_FONT(font_name) wxFont font_name(DEFAULT_FONT_SIZE, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, DEFAULT_FONT_NAME); #define DEFAULT_FONT(font_name) wxFont font_name(DEFAULT_FONT_SIZE, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, DEFAULT_FONT_NAME);
#define DELETE_ICON "./ressources/icons/process-stop.png" #define DELETE_ICON RESSOURCES_ROOT "icons/process-stop.png"
#define CHECKED_ICON "./ressources/icons/tick-icon.png" #define CHECKED_ICON RESSOURCES_ROOT "icons/tick-icon.png"
#define ACCOUNT_ICON "./ressources/icons/administrator-icon.png" #define ACCOUNT_ICON RESSOURCES_ROOT "icons/administrator-icon.png"
#define STATS_ICON "./ressources/icons/chart-icon.png" #define STATS_ICON RESSOURCES_ROOT "icons/chart-icon.png"
#define SEARCH_ICON "./ressources/icons/Search-icon.png" #define SEARCH_ICON RESSOURCES_ROOT "icons/Search-icon.png"
#define PREFS_ICON "./ressources/icons/options-icon.png" #define PREFS_ICON RESSOURCES_ROOT "icons/options-icon.png"
#define CHANGE_USER_ICON "./ressources/icons/Clients-icon.png" #define CHANGE_USER_ICON RESSOURCES_ROOT "icons/Clients-icon.png"
#define ABOUT_ICON "./ressources/icons/windows-users-icon.png" #define ABOUT_ICON RESSOURCES_ROOT "icons/windows-users-icon.png"
#define QUIT_ICON "./ressources/icons/system-log-out.png" #define QUIT_ICON RESSOURCES_ROOT "icons/system-log-out.png"
#define LANG_ROOT RESSOURCES_ROOT "po/"
#include "KissPanel.h" #include "KissPanel.h"

View File

@ -95,7 +95,7 @@ bool wxUI::SetLanguage(long language)
_locale = new wxLocale( language, wxLOCALE_CONV_ENCODING ); _locale = new wxLocale( language, wxLOCALE_CONV_ENCODING );
#ifdef __WXGTK__ #ifdef __WXGTK__
_locale->AddCatalogLookupPathPrefix(wxT("./ressources/po")); _locale->AddCatalogLookupPathPrefix(wxT(LANG_ROOT));
#endif #endif
_locale->AddCatalog(wxT("french")); _locale->AddCatalog(wxT("french"));
@ -110,7 +110,7 @@ bool wxUI::SetLanguage(long language)
_locale = new wxLocale(); _locale = new wxLocale();
#ifdef __WXGTK__ #ifdef __WXGTK__
_locale->AddCatalogLookupPathPrefix(wxT("./ressources/po")); _locale->AddCatalogLookupPathPrefix(wxT(LANG_ROOT));
#endif #endif
_locale->AddCatalog(wxT("kisscount")); _locale->AddCatalog(wxT("kisscount"));

View File

@ -1,4 +0,0 @@
#!/bin/bash
export LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH
./kc $*

View File

@ -19,7 +19,7 @@ fi
make || (echo "Compilation failed" ; exit 1) make || (echo "Compilation failed" ; exit 1)
mkdir -p "$DIR"/lib mkdir -p "$DIR"/lib
cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DIR"/lib cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DIR"/lib
cp -r kc init.sql ressources tools/launch_kc.sh TODO CONTRIBUTORS COPYING README README.fr www "$DIR" cp -r kc ressources tools/launch_kc.sh TODO CONTRIBUTORS COPYING README* www "$DIR"
find "$DIR" -type f -executable -exec ${PREFIX}strip \{\} \; find "$DIR" -type f -executable -exec ${PREFIX}strip \{\} \;
tar -jcf "$FILE" "$DIR" tar -jcf "$FILE" "$DIR"
rm -rf "$DIR" rm -rf "$DIR"
@ -28,7 +28,7 @@ rm -rf "$DIR"
rm -rf "$DEB_DIR" "$DEB_FILE" rm -rf "$DEB_DIR" "$DEB_FILE"
mkdir -p "$DEB_DIR/lib" mkdir -p "$DEB_DIR/lib"
cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DEB_DIR/lib" cp -r lib/freechart/lib/*.so* lib/wxsqlite3-1.9.9/lib/*.so* "$DEB_DIR/lib"
cp -r kc debian init.sql README* ressources tools "$DEB_DIR" cp -r kc.1 kc debian README* ChangeLog TODO CONTRIBUTORS ressources "$DEB_DIR"
#tar -zcf "$DEB_FILE" "$DEB_DIR" #tar -zcf "$DEB_FILE" "$DEB_DIR"
cd "$DEB_DIR" cd "$DEB_DIR"
mv debian/Makefile . mv debian/Makefile .