Started work on debian package
This commit is contained in:
parent
a8eb878d13
commit
5c21a548e3
15 changed files with 201 additions and 12 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -11,4 +11,8 @@ qrc_*.cpp
|
||||||
ui_*.h
|
ui_*.h
|
||||||
tags
|
tags
|
||||||
.session.vim
|
.session.vim
|
||||||
|
*-stamp
|
||||||
|
debian/*.log
|
||||||
|
debian/files
|
||||||
|
debian/*.substvars
|
||||||
|
debian/paysages3d
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -50,4 +50,20 @@ profile:
|
||||||
opannotate --source --output-dir=annotated ${BUILDPATH}/libpaysages.so --base-dirs=. --search-dirs=lib_paysages
|
opannotate --source --output-dir=annotated ${BUILDPATH}/libpaysages.so --base-dirs=. --search-dirs=lib_paysages
|
||||||
opreport -l ${BUILDPATH}/libpaysages.so -c -g | less
|
opreport -l ${BUILDPATH}/libpaysages.so -c -g | less
|
||||||
|
|
||||||
|
install:release
|
||||||
|
mkdir -p ${DESTDIR}/usr/bin
|
||||||
|
mkdir -p ${DESTDIR}/usr/lib
|
||||||
|
mkdir -p ${DESTDIR}/usr/share/paysages3d
|
||||||
|
cp build/release/paysages-qt ${DESTDIR}/usr/bin/paysages3d
|
||||||
|
cp build/release/libpaysages_exploring.so ${DESTDIR}/usr/lib/
|
||||||
|
cp build/release/libpaysages_rendering.so ${DESTDIR}/usr/lib/
|
||||||
|
cp data/.paysages_data ${DESTDIR}/usr/share/paysages3d/
|
||||||
|
cp -r data/i18n ${DESTDIR}/usr/share/paysages3d/
|
||||||
|
cp -r data/images ${DESTDIR}/usr/share/paysages3d/
|
||||||
|
cp cache/*.cache ${DESTDIR}/usr/share/paysages3d/
|
||||||
|
|
||||||
|
deb:
|
||||||
|
DEBFULLNAME="Michael Lemaire" DEBEMAIL=paysages@thunderk.net dch -i -p -u low -D stable
|
||||||
|
debuild -b -us -uc
|
||||||
|
|
||||||
.PHONY:all clean release
|
.PHONY:all clean release
|
||||||
|
|
3
TODO
3
TODO
|
@ -10,7 +10,8 @@ Technology Preview 2 :
|
||||||
=> Displacement on 3d explorer and previews.
|
=> Displacement on 3d explorer and previews.
|
||||||
=> Optimize ray marching (for tracing and shadows), using base terrain and displacement power.
|
=> Optimize ray marching (for tracing and shadows), using base terrain and displacement power.
|
||||||
- Fix rendering when inside a cloud layer, with other upper or lower layers.
|
- Fix rendering when inside a cloud layer, with other upper or lower layers.
|
||||||
- Compress and ship bruneton cache data.
|
- Create deb and rpm packages, and windows installer.
|
||||||
|
=> Compress and ship bruneton cache data.
|
||||||
- Translations.
|
- Translations.
|
||||||
|
|
||||||
Technlogy Preview 3 :
|
Technlogy Preview 3 :
|
||||||
|
|
6
debian/README
vendored
Normal file
6
debian/README
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
The Debian Package paysages3d
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Comments regarding the Package
|
||||||
|
|
||||||
|
-- Michael Lemaire <paysages@thunderk.net> Sun, 16 Jun 2013 09:36:17 +0200
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
paysages3d (0.2-1) stable; urgency=low
|
||||||
|
|
||||||
|
* Beta 2 release.
|
||||||
|
|
||||||
|
-- <paysages@thunderk.net> Sun, 16 Jun 2013 09:42:45 +0000
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
5
|
12
debian/control
vendored
Normal file
12
debian/control
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
Source: paysages3d
|
||||||
|
Section: graphics
|
||||||
|
Priority: extra
|
||||||
|
Maintainer: Michael Lemaire <paysages@thunderk.net>
|
||||||
|
Build-Depends: debhelper (>= 5)
|
||||||
|
Standards-Version: 3.7.3
|
||||||
|
|
||||||
|
Package: paysages3d
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, libglib2.0-0, libqt5core5, libqt5gui5, libqt5opengl5, libdevil1c2
|
||||||
|
Description: Paysages 3D is a landscape synthesizer and renderer
|
||||||
|
Paysages 3D is a work-in-progress 3D software, allowing to model, preview, and render vast natural sceneries, with ground, sky, clouds...
|
29
debian/copyright
vendored
Normal file
29
debian/copyright
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
This package was debianized by Michael Lemaire <paysages@thunderk.net> on
|
||||||
|
Sun, 16 Jun 2013 09:36:17 +0200.
|
||||||
|
|
||||||
|
Copyright:
|
||||||
|
|
||||||
|
Copyright (C) 2013 Michael Lemaire
|
||||||
|
|
||||||
|
License:
|
||||||
|
|
||||||
|
This package is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This package is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this package; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
On Debian systems, the complete text of the GNU General
|
||||||
|
Public License can be found in `/usr/share/common-licenses/GPL'.
|
||||||
|
|
||||||
|
The Debian packaging is (C) 2013, Michael Lemaire <paysages@thunderk.net> and
|
||||||
|
is licensed under the GPL, see above.
|
||||||
|
|
1
debian/dirs
vendored
Normal file
1
debian/dirs
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
usr/share/paysages3d
|
84
debian/rules
vendored
Executable file
84
debian/rules
vendored
Executable file
|
@ -0,0 +1,84 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
# Sample debian/rules that uses debhelper.
|
||||||
|
# This file was originally written by Joey Hess and Craig Small.
|
||||||
|
# As a special exception, when this file is copied by dh-make into a
|
||||||
|
# dh-make output file, you may use that output file without restriction.
|
||||||
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CFLAGS = -Wall -g
|
||||||
|
|
||||||
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||||
|
CFLAGS += -O0
|
||||||
|
else
|
||||||
|
CFLAGS += -O2
|
||||||
|
endif
|
||||||
|
|
||||||
|
configure: configure-stamp
|
||||||
|
configure-stamp:
|
||||||
|
dh_testdir
|
||||||
|
touch configure-stamp
|
||||||
|
|
||||||
|
|
||||||
|
build: build-stamp
|
||||||
|
|
||||||
|
build-stamp: configure-stamp
|
||||||
|
dh_testdir
|
||||||
|
$(MAKE)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
rm -f build-stamp configure-stamp
|
||||||
|
-$(MAKE) "DESTDIR=$(CURDIR)/debian/paysages3d" clean
|
||||||
|
dh_clean
|
||||||
|
|
||||||
|
install: build
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_clean -k
|
||||||
|
dh_installdirs
|
||||||
|
$(MAKE) "DESTDIR=$(CURDIR)/debian/paysages3d" install
|
||||||
|
|
||||||
|
binary-indep: build install
|
||||||
|
|
||||||
|
binary-arch: build install
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_installchangelogs
|
||||||
|
# dh_installdocs
|
||||||
|
# dh_installexamples
|
||||||
|
dh_install
|
||||||
|
# dh_installmenu
|
||||||
|
# dh_installdebconf
|
||||||
|
# dh_installlogrotate
|
||||||
|
# dh_installemacsen
|
||||||
|
# dh_installpam
|
||||||
|
# dh_installmime
|
||||||
|
# dh_pysupport
|
||||||
|
# dh_installinit
|
||||||
|
# dh_installcron
|
||||||
|
# dh_installinfo
|
||||||
|
# dh_installman debian/*.1
|
||||||
|
dh_link
|
||||||
|
dh_strip
|
||||||
|
dh_compress
|
||||||
|
dh_fixperms
|
||||||
|
# dh_perl
|
||||||
|
# dh_makeshlibs
|
||||||
|
dh_installdeb
|
||||||
|
dh_shlibdeps
|
||||||
|
dh_gencontrol
|
||||||
|
dh_md5sums
|
||||||
|
dh_builddeb
|
||||||
|
|
||||||
|
binary: binary-indep binary-arch
|
||||||
|
.PHONY: build clean binary-indep binary-arch binary install configure
|
||||||
|
|
|
@ -43,7 +43,7 @@ int main(int argc, char** argv)
|
||||||
QTranslator qtTranslator;
|
QTranslator qtTranslator;
|
||||||
QTranslator myTranslator;
|
QTranslator myTranslator;
|
||||||
|
|
||||||
if (myTranslator.load("paysages_" + QLocale::system().name(), "./data/i18n"))
|
if (myTranslator.load("paysages_" + QLocale::system().name(), "./data/i18n") || myTranslator.load("paysages_" + QLocale::system().name(), "/usr/share/paysages3d/i18n"))
|
||||||
{
|
{
|
||||||
app.installTranslator(&myTranslator);
|
app.installTranslator(&myTranslator);
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,17 @@ static inline QColor colorToQColor(Color color)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QString getDataPath(QString path)
|
static inline QString getDataPath(QString path)
|
||||||
|
{
|
||||||
|
QFile datafile(QDir("/usr/share/paysages3d/").absoluteFilePath(path));
|
||||||
|
if (datafile.exists())
|
||||||
|
{
|
||||||
|
return datafile.fileName();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return QDir("./data").absoluteFilePath(path);
|
return QDir("./data").absoluteFilePath(path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString getHumanMemory(qint64 memused);
|
QString getHumanMemory(qint64 memused);
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,10 @@ LIBS += glib-2.0 gthread-2.0 IL ILU
|
||||||
CC_FLAGS += -DHAVE_GLIB=1
|
CC_FLAGS += -DHAVE_GLIB=1
|
||||||
CC_LDFLAGS += -shared
|
CC_LDFLAGS += -shared
|
||||||
|
|
||||||
CHECK_OPENCL = $(shell pkg-config --modversion --silence-errors OpenCL)
|
#CHECK_OPENCL = $(shell pkg-config --modversion --silence-errors OpenCL)
|
||||||
ifneq (,${CHECK_OPENCL})
|
#ifneq (,${CHECK_OPENCL})
|
||||||
LIBS += OpenCL
|
# LIBS += OpenCL
|
||||||
CC_FLAGS += -DHAVE_OPENCL=1
|
# CC_FLAGS += -DHAVE_OPENCL=1
|
||||||
endif
|
#endif
|
||||||
|
|
||||||
include ../common_post.mk
|
include ../common_post.mk
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
struct CacheFile
|
struct CacheFile
|
||||||
{
|
{
|
||||||
|
char* datapath;
|
||||||
char* filepath;
|
char* filepath;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,8 +15,10 @@ CacheFile* cacheFileCreateAccessor(const char* module, const char* ext, const ch
|
||||||
CacheFile* result;
|
CacheFile* result;
|
||||||
|
|
||||||
result = (CacheFile*)malloc(sizeof(CacheFile));
|
result = (CacheFile*)malloc(sizeof(CacheFile));
|
||||||
|
result->datapath = malloc(sizeof(char) * 501);
|
||||||
result->filepath = malloc(sizeof(char) * 501);
|
result->filepath = malloc(sizeof(char) * 501);
|
||||||
|
|
||||||
|
snprintf(result->datapath, 500, "/usr/share/paysages3d/%s-%s-%d-%d-%d-%d-%d.%s", module, tag1, tag2, tag3, tag4, tag5, tag6, ext);
|
||||||
snprintf(result->filepath, 500, "./cache/%s-%s-%d-%d-%d-%d-%d.%s", module, tag1, tag2, tag3, tag4, tag5, tag6, ext);
|
snprintf(result->filepath, 500, "./cache/%s-%s-%d-%d-%d-%d-%d.%s", module, tag1, tag2, tag3, tag4, tag5, tag6, ext);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -23,6 +26,7 @@ CacheFile* cacheFileCreateAccessor(const char* module, const char* ext, const ch
|
||||||
|
|
||||||
void cacheFileDeleteAccessor(CacheFile* cache)
|
void cacheFileDeleteAccessor(CacheFile* cache)
|
||||||
{
|
{
|
||||||
|
free(cache->datapath);
|
||||||
free(cache->filepath);
|
free(cache->filepath);
|
||||||
free(cache);
|
free(cache);
|
||||||
}
|
}
|
||||||
|
@ -36,10 +40,19 @@ int cacheFileIsReadable(CacheFile* cache)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
FILE* f = fopen(cache->datapath, "rb");
|
||||||
|
if (f)
|
||||||
|
{
|
||||||
|
fclose(f);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int cacheFileIsWritable(CacheFile* cache)
|
int cacheFileIsWritable(CacheFile* cache)
|
||||||
{
|
{
|
||||||
|
@ -59,5 +72,14 @@ int cacheFileIsWritable(CacheFile* cache)
|
||||||
|
|
||||||
const char* cacheFileGetPath(CacheFile* cache)
|
const char* cacheFileGetPath(CacheFile* cache)
|
||||||
{
|
{
|
||||||
|
FILE* f = fopen(cache->filepath, "rb");
|
||||||
|
if (f)
|
||||||
|
{
|
||||||
|
fclose(f);
|
||||||
return cache->filepath;
|
return cache->filepath;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return cache->datapath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -30,5 +30,5 @@ static int _tryDataPath(const char* path)
|
||||||
|
|
||||||
int dataInit()
|
int dataInit()
|
||||||
{
|
{
|
||||||
return _tryDataPath("./data");
|
return _tryDataPath("./data") || _tryDataPath("/usr/share/paysages3d");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue