only install/copy srs.db that we're using (fix 56d03f783f041)

This commit is contained in:
Juergen E. Fischer 2019-07-17 15:39:22 +02:00 committed by Jürgen Fischer
parent 93cd83255b
commit 557d1afcf7
7 changed files with 15 additions and 33 deletions

View File

@ -3,7 +3,6 @@ set -e
if [ "$1" = "configure" ] && [ -x /usr/lib/qgis/crssync ]; then
cp /usr/share/qgis/resources/srs-template.db /usr/share/qgis/resources/srs.db
cp /usr/share/qgis/resources/srs6-template.db /usr/share/qgis/resources/srs6.db
dpkg-trigger qgis-crssync
fi

View File

@ -4,8 +4,5 @@ set -e
if [ "$1" = "remove" ] && [ -e /usr/share/qgis/resources/srs.db ]; then
rm -f /usr/share/qgis/resources/srs.db || true
fi
if [ "$1" = "remove" ] && [ -e /usr/share/qgis/resources/srs6.db ]; then
rm -f /usr/share/qgis/resources/srs6.db || true
fi
#DEBHELPER#

View File

@ -5,9 +5,6 @@ if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then
if [ -w /usr/share/qgis/resources/srs.db ] && [ -x /usr/lib/qgis/crssync ]; then
/usr/lib/qgis/crssync
fi
if [ -w /usr/share/qgis/resources/srs6.db ] && [ -x /usr/lib/qgis/crssync ]; then
/usr/lib/qgis/crssync
fi
fi
#DEBHELPER#

1
debian/rules vendored
View File

@ -300,7 +300,6 @@ override_dh_auto_install:
# Don't ship srs.db, automatically updated in postinst with crssync
mv $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs.db $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs-template.db
mv $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs6.db $(CURDIR)/debian/tmp/usr/share/qgis/resources/srs6-template.db
# Mime info
install -o root -g root -d $(CURDIR)/debian/tmp/usr/share/mime/packages

View File

@ -322,7 +322,6 @@ for %%i in (%packages%) do (
"apps/%PACKAGENAME%/resources/qgis.db" ^
"apps/%PACKAGENAME%/resources/spatialite.db" ^
"apps/%PACKAGENAME%/resources/srs.db" ^
"apps/%PACKAGENAME%/resources/srs.db" ^
"apps/%PACKAGENAME%/resources/symbology-style.xml" ^
"apps/%PACKAGENAME%/resources/cpt-city-qgis-min/" ^
"apps/%PACKAGENAME%/svg/" ^

View File

@ -1,5 +1,14 @@
INSTALL(FILES srs.db
srs6.db
IF (PROJ_VERSION_MAJOR GREATER 5)
MESSAGE(STATUS "Using PROJ 6 srs database.")
SET(SRSDB srs6.db)
ELSE (PROJ_VERSION_MAJOR GREATER 5)
MESSAGE(STATUS "Using PROJ <6 srs database.")
SET(SRSDB srs.db)
ENDIF (PROJ_VERSION_MAJOR GREATER 5)
INSTALL(FILES ${SRSDB} DESTINATION ${QGIS_DATA_DIR}/resources RENAME srs.db)
INSTALL(FILES
qgis.db
symbology-style.xml
spatialite.db

View File

@ -955,34 +955,17 @@ QString QgsApplication::iconsPath()
QString QgsApplication::srsDatabaseFilePath()
{
#if PROJ_VERSION_MAJOR>=6
if ( ABISYM( mRunningFromBuildDir ) )
{
QString tempCopy = QDir::tempPath() + "/srs6.db";
if ( !QFile( tempCopy ).exists() )
{
QFile f( pkgDataPath() + "/resources/srs6.db" );
if ( !f.copy( tempCopy ) )
{
qFatal( "Could not create temporary copy" );
}
}
return tempCopy;
}
else
{
return pkgDataPath() + QStringLiteral( "/resources/srs6.db" );
}
#else
if ( ABISYM( mRunningFromBuildDir ) )
{
QString tempCopy = QDir::tempPath() + "/srs.db";
if ( !QFile( tempCopy ).exists() )
{
#if PROJ_VERSION_MAJOR>=6
QFile f( pkgDataPath() + "/resources/srs6.db" );
#else
QFile f( pkgDataPath() + "/resources/srs.db" );
#endif
if ( !f.copy( tempCopy ) )
{
qFatal( "Could not create temporary copy" );
@ -995,7 +978,6 @@ QString QgsApplication::srsDatabaseFilePath()
{
return pkgDataPath() + QStringLiteral( "/resources/srs.db" );
}
#endif
}
QStringList QgsApplication::svgPaths()