From 6ee42318e53cd5c8431443c1cec6d590cfceab23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Fri, 1 Jun 2012 21:36:58 +0200 Subject: [PATCH] Work on setup --- Makefile | 4 ++ debian/Makefile | 95 +----------------------------------------- debian/control | 2 +- tools/package_win32.sh | 2 + 4 files changed, 8 insertions(+), 95 deletions(-) mode change 100644 => 120000 debian/Makefile diff --git a/Makefile b/Makefile index 8f9ac68..11df91b 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,11 @@ install: mkdir -p $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR) cp kc $(BIN_DIR) cp -rf ressources/* $(SHARE_DIR) + rm -rf $(SHARE_DIR)/ressources/po/* + cp -rf ressources/po/*.qm $(SHARE_DIR)/ressources/po/ cp -rf README* ChangeLog CONTRIBUTORS COPYING TODO $(DOC_DIR) remove: rm -rf $(LIB_DIR) $(SHARE_DIR) $(DOC_DIR) $(BIN_DIR)/kc + +uninstall: remove \ No newline at end of file diff --git a/debian/Makefile b/debian/Makefile deleted file mode 100644 index 70d56bc..0000000 --- a/debian/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -ROOT_DIR="/usr" -#LIB_DIR=$(DESTDIR)$(ROOT_DIR)"/lib/kisscount/" -SHARE_DIR=$(DESTDIR)$(ROOT_DIR)"/share/kisscount/" -DOC_DIR=$(DESTDIR)$(ROOT_DIR)"/share/doc/kisscount/" -BIN_DIR=$(DESTDIR)$(ROOT_DIR)"/bin/" - -QT_PACKAGES="QtCore QtGui QtSql QtXml" -CXXFLAGS=`pkg-config --cflags $(QT_PACKAGES)` -CXXFLAGS+=-Wall -Isrc -ggdb -fPIC -CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\"" -# For developpers -#CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\"" - -LDFLAGS=`pkg-config --libs $(QT_PACKAGES)` -LDFLAGS+=-lofx - -CXX=$(HOST)g++ - -SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ') -OBJS=$(SOURCES:.cpp=.o) -MOC_HEADERS=$(shell find src/view -name '*.hpp' -type f | tr '\n' ' ') -MOCS=$(MOC_HEADERS:.hpp=.objs) -MOCS_OBJS=$(MOC_HEADERS:.hpp=.moc) - -CXXFLAGS+=-Ilib/libkdchart/include -Ilib/libkdchart/src -Ilib/libkdchart/kdablibfakes/include -CXXFLAGS+=-DKDCHART_BUILD_KDCHART_LIB -KDCHART_SOURCES=$(shell find lib/libkdchart/src -name '*.cpp' -type f | tr '\n' ' ') -KDCHART_OBJS=$(KDCHART_SOURCES:.cpp=.o) -UI_CHARTSELECTOR=lib/libkdchart/src/ui_KDChartDatasetSelector.h -KDCHART_MOC_HEADERS=$(shell find lib/libkdchart/src -name '*.h' -type f | tr '\n' ' ') -KDCHART_MOCS=$(KDCHART_MOC_HEADERS:.h=.objs) -KDCHART_MOCS_OBJS=$(KDCHART_MOC_HEADERS:.h=.moc) -LDFLAGS+=lib/libkdchart.a - -all: mojito lib/libkdchart.a kc - -clean_all: clean clean_libkdchart - -clean: - find src -type f -name '*.o' -delete - find src -type f -name '*~' -delete - find src -type f -name '*.moc' -delete - find src -type f -name '*.objs' -delete - rm -f kc - -%.o : %.cpp - $(CXX) $(CXXFLAGS) -c $< -o $@ - -%.objs : %.moc - $(CXX) $(CXXFLAGS) -x c++ $< -c -o $@ - -%.moc : %.hpp - moc -nw $< -o $@ - -%.moc : %.h - moc -nw $< -o $@ - -mojito : $(MOCS_OBJS) $(KDCHART_MOCS_OBJS) - -kc: $(MOCS) $(OBJS) - $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) - -$(UI_CHARTSELECTOR): lib/libkdchart/src/KDChartDatasetSelector.ui - uic $< > $(UI_CHARTSELECTOR) - sed s/KDCHARTDATASETSELECTOR_H/UI_KDCHARTDATASETSELECTOR_H/g -i $(UI_CHARTSELECTOR) - -lib/libkdchart.a: $(UI_CHARTSELECTOR) $(KDCHART_MOCS) $(KDCHART_OBJS) - ar rcu lib/libkdchart.a $(KDCHART_MOCS) $(KDCHART_OBJS) - -clean_libkdchart: - rm -rf lib/libkdchart.a - find lib/libkdchart -name '*.o' -delete - find lib/libkdchart -type f -name '*.moc' -delete - find lib/libkdchart -type f -name '*.objs' -delete - -generate_locales: - ./tools/generate_locales.sh - -ifdef WIN32 -package: - ./tools/package_win32.sh -else -package: - ./tools/package.sh -endif - -install: - mkdir -p $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR) - cp kc $(BIN_DIR) - cp -rf ressources/* $(SHARE_DIR) - cp -rf README* ChangeLog CONTRIBUTORS COPYING TODO $(DOC_DIR) - -remove: - rm -rf $(LIB_DIR) $(SHARE_DIR) $(DOC_DIR) $(BIN_DIR)/kc diff --git a/debian/Makefile b/debian/Makefile new file mode 120000 index 0000000..d0b0e8e --- /dev/null +++ b/debian/Makefile @@ -0,0 +1 @@ +../Makefile \ No newline at end of file diff --git a/debian/control b/debian/control index dbd0037..8717e27 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: kisscount Section: misc Priority: extra Maintainer: Grégory Soutadé -Build-Depends: debhelper (>= 7.0.50~), libofx-dev, libqt4-dev (>= 4.7) +Build-Depends: debhelper (>= 7.0.50~), libofx-dev, libqt4-dev (>= 4.7), libqt4-sql-sqlite Standards-Version: 3.9.1 Homepage: http://indefero.soutade.fr/p/kisscount/ Vcs-Git: git://soutade.fr/kisscount.git diff --git a/tools/package_win32.sh b/tools/package_win32.sh index 0cc8164..3534361 100755 --- a/tools/package_win32.sh +++ b/tools/package_win32.sh @@ -15,6 +15,8 @@ make || (echo "Compilation failed" ; exit 1) mkdir -p "$DIR" cp -r lib/*.dll* "$DIR" cp -r kc ressources TODO CONTRIBUTORS COPYING README README.fr www "$DIR" +rm -rf "$DIR/ressources/po/*" +cp -r ressources/po/*.qm "$DIR/ressources/po/" # Copy only QM files mv "$DIR"/kc "$DIR"/kc.exe find "$DIR" -type f -executable -exec ${PREFIX}strip \{\} \; zip -r "$FILE" "$DIR"