summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Villegas <marco@marvil07.net>2021-02-10 16:03:28 +0100
committerMarco Villegas <marco@marvil07.net>2021-02-10 16:03:28 +0100
commit20f42f32b02a5814f962cff83565b42b18132017 (patch)
tree5ada07ca64f4d4aad53c3c3dd77c844435aa04f8
parent74e8e2318d637a4de8fbbe871c874ed3a816c618 (diff)
parentdd65b47498e9f137f52a65c677cd569c53e92430 (diff)
php-easyrdf (1.0.0-2) unstable; urgency=medium
* Change gbp to use debian/bullseye for the maintenance branch * Test server output before using it during smoke testing [dgit import unpatched php-easyrdf 1.0.0-2]
-rw-r--r--debian/changelog81
-rw-r--r--debian/clean1
-rw-r--r--debian/control48
-rw-r--r--debian/copyright67
-rw-r--r--debian/docs1
-rw-r--r--debian/gbp.conf5
-rw-r--r--debian/install1
-rwxr-xr-xdebian/rules11
-rw-r--r--debian/source/format1
-rw-r--r--debian/tests/control14
-rw-r--r--debian/tests/data/foaf.rdf42
-rw-r--r--debian/tests/rapper.php14
-rw-r--r--debian/tests/rapper.sh20
-rw-r--r--debian/tests/test.php17
-rw-r--r--debian/tests/test.sh17
-rw-r--r--debian/upstream/metadata5
-rw-r--r--debian/watch2
17 files changed, 347 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..1c8e431
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,81 @@
+php-easyrdf (1.0.0-2) unstable; urgency=medium
+
+ * Change gbp to use debian/bullseye for the maintenance branch
+ * Test server output before using it during smoke testing
+
+ -- Marco Villegas <marco@marvil07.net> Wed, 10 Feb 2021 10:03:28 -0500
+
+php-easyrdf (1.0.0-1) unstable; urgency=medium
+
+ * New upstream release 1.0.0.
+ Lots of modernization, highligths from release notes are support for newer
+ php versions, use of PSR-4 autoloader. Plese see CHANGELOG.md for more
+ information.
+ Special thanks to Elías Alejandro Año Mendoza for unblocking me by
+ pointing to the right next step.
+ * Start autoload generation via phpab.
+ * Change install path now that namespaces are in place.
+ * Update smoke tests to follow upstream and new autoload method.
+ Mark them with autopkgtest superficial restriction.
+ * Copyright update.
+ * Add readme as documentation
+ * Setup gbp to sign tags created by import-orig or import-ref
+ * Remove php-mbstring from dependencies, it is autoadded.
+ * Use Tests instead of Test-command for package tests.
+
+ -- Marco Villegas <marco@marvil07.net> Tue, 19 Jan 2021 09:47:36 -0500
+
+php-easyrdf (0.9.1-5) unstable; urgency=medium
+
+ * Change upstream locations, now the project is not under the njh user, but
+ instead it is under the github organization easyrdf.
+ * Use secure URI in Homepage field.
+ * Change slightly uscan watch expression to avoid the problem with
+ 1.0.0-rc.1 recognized as higher than 1.0.0.
+ * Set upstream metadata fields: Repository, Repository-Browse.
+ * Set Rules-Requires-Root: no.
+ * Run smoke test on build, changing the test script a bit to accommodate for
+ the case.
+ * Stop depending on network access at smoke tests.
+
+ -- Marco Villegas <marco@marvil07.net> Fri, 28 Aug 2020 18:07:59 -0500
+
+php-easyrdf (0.9.1-4) unstable; urgency=medium
+
+ * debian/control:
+ - Add raptor2-utils as suggested, hinting one of the features in the
+ library.
+ - Add graphviz as suggested, hinting a way to process files produced via
+ rapper serialiser.
+ - Add a smoke test using rapper to output a dot file, and later use
+ graphviz to convert it into an image.
+ - Remove pkg-php-tools build dependency version constraint, not needed.
+ - Bump debhelper version to newest.
+ - Remove composer from build dependencies.
+ Closes: #934913.
+
+ -- Marco Villegas <marco@marvil07.net> Wed, 26 Aug 2020 10:59:54 -0500
+
+php-easyrdf (0.9.1-3) unstable; urgency=medium
+
+ * debian/upstream/metadata:
+ - Started upstream metadata file.
+
+ -- Marco Villegas <marco@marvil07.net> Mon, 12 Aug 2019 05:07:06 -0300
+
+php-easyrdf (0.9.1-2) unstable; urgency=medium
+
+ * debian/control:
+ - Depend on php-xml, since it is used internally by the library.
+ * debian/tests/control:
+ - Depend on php-cli, which is used for the execution.
+
+ -- Marco Villegas <marco@marvil07.net> Tue, 06 Aug 2019 21:11:22 -0300
+
+php-easyrdf (0.9.1-1) unstable; urgency=medium
+
+ * Initial release.
+ Add the first RDF consumer and producer php library in debian.
+ Closes: #932244.
+
+ -- Marco Villegas <marco@marvil07.net> Sat, 20 Jul 2019 11:53:08 -0300
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..6d47d7c
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+lib/autoload.php
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..8a9c288
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,48 @@
+Source: php-easyrdf
+Priority: optional
+Maintainer: Debian PHP PEAR Maintainers <pkg-php-pear@lists.alioth.debian.org>
+Uploaders:
+ Marco Villegas <marco@marvil07.net>,
+Build-Depends:
+ curl,
+ debhelper-compat (= 13),
+ phpab,
+ pkg-php-tools,
+Standards-Version: 4.5.0
+Section: php
+Homepage: https://www.easyrdf.org/
+Vcs-Browser: https://salsa.debian.org/php-team/pear/php-easyrdf
+Vcs-Git: https://salsa.debian.org/php-team/pear/php-easyrdf.git
+Rules-Requires-Root: no
+
+Package: php-easyrdf
+Architecture: all
+Depends:
+ php-xml,
+ ${misc:Depends},
+ ${phpcomposer:Debian-require},
+Suggests:
+ ${phpcomposer:Debian-suggest},
+ graphviz,
+ raptor2-utils,
+Provides:
+ ${phpcomposer:Debian-provide},
+Description: PHP library to consume and produce RDF
+ EasyRdf is a PHP library to consume and produce RDF.
+ Resource Description Framework, RDF, is an official W3C Recommendation
+ for Semantic Web data models.
+ .
+ After parsing EasyRdf builds up a graph of PHP objects that can then be
+ walked around to get the data to be placed on the page.
+ Dump methods are available to inspect what data is available during
+ development.
+ .
+ Data is typically loaded into a EasyRdf_Graph object from source RDF
+ documents, loaded from the web via HTTP.
+ The EasyRdf_GraphStore class can load and save data on a SPARQL 1.1
+ Graph Store.
+ .
+ SPARQL queries can be made over HTTP to a Triplestore using the
+ EasyRdf_Sparql_Client class.
+ SELECT and ASK queries will return an EasyRdf_Sparql_Result object and
+ CONSTRUCT and DESCRIBE queries will return an EasyRdf_Graph object.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..47c6691
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,67 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: EasyRdf
+Upstream-Contact: Nicholas Humfrey <njh@aelius.com>
+Source: https://github.com/njh/easyrdf
+
+Files: *
+Copyright:
+ 1997-2013 Aduna
+ 2004-2010 Benjamin Nowack
+ 2005-2009 Zend Technologies USA Inc.
+ 2009-2020 Nicholas J Humfrey <njh@aelius.com>
+ 2014 Alexey Zakhlestin <indeyets@gmail.com>
+ 2014 Markus Lanthaler <mail@markus-lanthaler.com>
+License: BSD-3-Clause~Nicholas
+
+Files: debian/*
+Copyright:
+ 2019 Marco Villegas <marco@marvil07.net>
+License-Grant:
+ This program 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 3 of the License, or (at your
+ option) any later version.
+License: GPL-3+
+
+License: BSD-3-Clause~Nicholas
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author 'Nicholas J Humfrey" may be used to endorse
+ or promote products derived from this software without specific prior
+ written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: GPL-3+
+ This program 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 3 of the License, or (at your
+ option) any later version.
+ .
+ This program 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 program. If not, see <https://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..48d3504
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,5 @@
+[DEFAULT]
+pristine-tar = True
+pristine-tar-commit = True
+sign-tags=True
+debian-branch = debian/bullseye
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..71c4804
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+lib/* usr/share/php/EasyRdf
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b158cdd
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+%:
+ dh $@ --with phpcomposer
+
+execute_after_dh_auto_build:
+ phpab --output lib/autoload.php \
+ lib
+
+override_dh_auto_test:
+ dh_auto_test -- --with phpcomposer
+ sh debian/tests/test.sh -l
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..358fac3
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,14 @@
+Tests: test.sh
+Depends: @,
+ curl,
+ php-cli,
+Restrictions: allow-stderr, superficial
+
+Tests: rapper.sh
+Depends: @,
+ curl,
+ file,
+ graphviz,
+ php-cli,
+ raptor2-utils,
+Restrictions: allow-stderr, superficial
diff --git a/debian/tests/data/foaf.rdf b/debian/tests/data/foaf.rdf
new file mode 100644
index 0000000..8d3e311
--- /dev/null
+++ b/debian/tests/data/foaf.rdf
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:cert="http://www.w3.org/ns/auth/cert#"
+ xmlns:dc="http://purl.org/dc/terms/">
+
+ <foaf:PersonalProfileDocument rdf:about="http://localhost:10101/foaf.rdf">
+ <rdfs:label>Jane Fiction's FOAF File</rdfs:label>
+ <foaf:maker rdf:resource="http://localhost:10101/"/>
+ <foaf:primaryTopic rdf:resource="http://localhost:10101/"/>
+ </foaf:PersonalProfileDocument>
+
+ <foaf:Person rdf:about="http://localhost:10101/">
+ <foaf:name>Jane Fiction</foaf:name>
+ <foaf:title>Dr</foaf:title>
+ <foaf:givenName>Jane</foaf:givenName>
+ <foaf:familyName>Fiction</foaf:familyName>
+ <foaf:gender>Female</foaf:gender>
+ <foaf:homepage rdf:resource="http://localhost:10101/"/>
+ <foaf:made rdf:resource="http://localhost:10101/"/>
+ <foaf:nick>jjff</foaf:nick>
+ <foaf:interest>
+ <rdf:Description rdf:about="https://www.wikidata.org/wiki/Q7715973">
+ <dc:title>Debian</dc:title>
+ <rdfs:label>Debian</rdfs:label>
+ </rdf:Description>
+ </foaf:interest>
+ <foaf:interest>
+ <rdf:Description rdf:about="https://www.wikidata.org/wiki/Q388">
+ <dc:title>Linux</dc:title>
+ <rdfs:label>Linux</rdfs:label>
+ </rdf:Description>
+ </foaf:interest>
+ </foaf:Person>
+
+ <foaf:Document rdf:about="http://localhost:10101/">
+ <rdfs:label>Homepage of Jane Fiction</rdfs:label>
+ </foaf:Document>
+
+</rdf:RDF>
diff --git a/debian/tests/rapper.php b/debian/tests/rapper.php
new file mode 100644
index 0000000..7939398
--- /dev/null
+++ b/debian/tests/rapper.php
@@ -0,0 +1,14 @@
+<?php
+
+include_once 'EasyRdf/autoload.php';
+
+EasyRdf\Format::registerSerialiser('dot', 'EasyRdf\Serialiser\Rapper');
+
+$foaf = new \EasyRdf\Graph('http://localhost:10101/foaf.rdf');
+$foaf->load();
+
+$data = $foaf->serialise('dot');
+if (!is_scalar($data)) {
+ exit(1);
+}
+echo $data, PHP_EOL;
diff --git a/debian/tests/rapper.sh b/debian/tests/rapper.sh
new file mode 100644
index 0000000..b86157b
--- /dev/null
+++ b/debian/tests/rapper.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+# Start a web server to serve the file.
+php --server localhost:10101 --docroot debian/tests/data &
+SERVER_PID=$!
+
+# A graphviz source file can be created.
+php debian/tests/rapper.php > sample.dot
+
+kill -9 $SERVER_PID
+
+# A valid dot can be used by graphviz.
+dot -Tpng sample.dot > sample.png
+MIME_TYPE=`file --mime-type --brief sample.png`
+if [ "$MIME_TYPE" != 'image/png' ]
+then
+ exit 1;
+fi
diff --git a/debian/tests/test.php b/debian/tests/test.php
new file mode 100644
index 0000000..59d956b
--- /dev/null
+++ b/debian/tests/test.php
@@ -0,0 +1,17 @@
+<?php
+
+$options = getopt('l');
+if (isset($options['l'])) {
+ // l: Local loading, for build testing.
+ include_once __DIR__ . '/../../lib/autoload.php';
+}
+else {
+ // Usual loading, e.g. at autopkgtest run.
+ include_once 'EasyRdf/autoload.php';
+}
+$url = 'http://localhost:10101/foaf.rdf';
+#$url = 'http://njh.me/foaf.rdf';
+$foaf = new \EasyRdf\Graph($url);
+$foaf->load();
+$author = $foaf->primaryTopic();
+echo 'Main author name is: ', $author->get('foaf:name'), PHP_EOL;
diff --git a/debian/tests/test.sh b/debian/tests/test.sh
new file mode 100644
index 0000000..d9b8b39
--- /dev/null
+++ b/debian/tests/test.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+# Start a web server to serve the file.
+php --server localhost:10101 --docroot debian/tests/data &
+SERVER_PID=$!
+set +e
+curl --fail --silent --output /dev/null http://localhost:10101/foaf.rdf
+if [ $? -ne 0 ]
+then
+ # Likely 22, the server may not be ready, give it a bit of time.
+ sleep 2
+fi
+set -e
+php debian/tests/test.php $@
+kill -9 $SERVER_PID
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..539585a
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,5 @@
+Bug-Database: https://github.com/easyrdf/easyrdf/issues
+Bug-Submit: https://github.com/easyrdf/easyrdf/issues/new
+Contact: https://github.com/easyrdf/easyrdf/issues/new
+Repository: https://github.com/easyrdf/easyrdf.git
+Repository-Browse: https://github.com/easyrdf/easyrdf
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..f9c9755
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=4
+opts="uversionmangle=s/-?([^\d.]+)/~$1/;tr/A-Z/a-z/" https://github.com/easyrdf/easyrdf/tags .*/archive/([\d\S]+).tar.gz