Commit 56a9abe9 authored by Volker Krause's avatar Volker Krause
Browse files

Generate correct and REUSE compliant SPDX headers for the database files

parent 1cfc6291
......@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: none
data/*
dist/*
timezones.png
timezones.pgw
timezones.colormap
......
......@@ -293,7 +293,7 @@ bool AirportDbGenerator::generate(QIODevice* out)
indexNames();
// step 4 generate code
CodeGen::writeLicenseHeader(out);
CodeGen::writeLicenseHeaderOSM(out);
out->write(R"(
#include "airportdb.h"
......
......@@ -11,10 +11,22 @@
using namespace KItinerary::Generator;
void CodeGen::writeLicenseHeader(QIODevice *out)
void CodeGen::writeLicenseHeaderWikidata(QIODevice *out)
{
out->write(R"(/*
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: Wikidata contributors
*
* This code is auto-generated from Wikidata, do not edit!
*/
)");
}
void CodeGen::writeLicenseHeaderOSM(QIODevice *out)
{
out->write(R"(/*
* SPDX-License-Identifier: ODbL-1.0
* SPDX-FileCopyrightText: OpenStreetMap contributors
*
* This code is auto-generated from OpenStreetMap (licensed under ODbL) and Wikidata (licensed under CC0), do not edit!
*/
......
......@@ -20,7 +20,8 @@ namespace Generator {
/** Code generation utilities. */
namespace CodeGen
{
void writeLicenseHeader(QIODevice *out);
void writeLicenseHeaderWikidata(QIODevice *out);
void writeLicenseHeaderOSM(QIODevice *out);
void writeCoordinate(QIODevice *out, KnowledgeDb::Coordinate coord);
void writeCountryIsoCode(QIODevice *out, const QString &isoCode);
void writeTimezone(QIODevice *out, const QByteArray &tzName);
......
......@@ -38,7 +38,7 @@ bool CountryDbGenerator::generate(QIODevice* out)
return false;
}
CodeGen::writeLicenseHeader(out);
CodeGen::writeLicenseHeaderWikidata(out);
out->write(R"(
#include "knowledgedb.h"
#include "countrydb_p.h"
......
......@@ -162,6 +162,7 @@ class SpatialIndexerTask(QgsTask):
out = open(self.outputFileName, "w")
out.write("""/*
* SPDX-License-Identifier: ODbL-1.0
* SPDX-FileCopyrightText: OpenStreetMap contributors
*
* Autogenerated spatial index generated using QGIS.
*/
......
......@@ -15,7 +15,7 @@ using namespace KItinerary::Generator;
void TimezoneDbGenerator::generate(QIODevice *out)
{
CodeGen::writeLicenseHeader(out);
CodeGen::writeLicenseHeaderOSM(out);
Timezones tzDb;
......@@ -91,7 +91,7 @@ static constexpr const CountryId timezone_country_map[] = {
void TimezoneDbGenerator::generateHeader(QIODevice *out)
{
CodeGen::writeLicenseHeader(out);
CodeGen::writeLicenseHeaderOSM(out);
Timezones tzDb;
out->write(R"(
......
......@@ -51,7 +51,7 @@ bool TrainStationDbGenerator::generate(QIODevice *out)
processStations();
// code generation
CodeGen::writeLicenseHeader(out);
CodeGen::writeLicenseHeaderWikidata(out);
out->write(R"(
#include "knowledgedb.h"
#include "trainstationdb.h"
......
/*
* SPDX-License-Identifier: ODbL-1.0
* SPDX-FileCopyrightText: OpenStreetMap contributors
*
* This code is auto-generated from OpenStreetMap (licensed under ODbL) and Wikidata (licensed under CC0), do not edit!
*/
/*
* This code is auto-generated from Wikidata data. Licensed under CC0.
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: Wikidata contributors
*
* This code is auto-generated from Wikidata, do not edit!
*/
#include "knowledgedb.h"
......
/*
* SPDX-License-Identifier: ODbL-1.0
* SPDX-FileCopyrightText: OpenStreetMap contributors
*
* Autogenerated spatial index generated using QGIS.
*/
/*
* SPDX-License-Identifier: ODbL-1.0
* SPDX-FileCopyrightText: OpenStreetMap contributors
*
* This code is auto-generated from OpenStreetMap (licensed under ODbL) and Wikidata (licensed under CC0), do not edit!
*/
......
/*
* SPDX-License-Identifier: ODbL-1.0
* SPDX-FileCopyrightText: OpenStreetMap contributors
*
* This code is auto-generated from OpenStreetMap (licensed under ODbL) and Wikidata (licensed under CC0), do not edit!
*/
......
/*
* SPDX-License-Identifier: ODbL-1.0
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: Wikidata contributors
*
* This code is auto-generated from OpenStreetMap (licensed under ODbL) and Wikidata (licensed under CC0), do not edit!
*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment