summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Zini <enrico@enricozini.org>2013-10-24 01:36:38 +0200
committerEnrico Zini <enrico@enricozini.org>2013-10-24 01:36:38 +0200
commit866a0cbcda0e33941f0709d8a0d5bb00fdd786b6 (patch)
tree3fa51fef71e687c672253f4e4a6a779d96619e75
parent584ced4ff06a00caa3837deb6452314346ba5373 (diff)
downloadlibept-866a0cbcda0e33941f0709d8a0d5bb00fdd786b6.tar.gz
Prepared new release
* Dropped Conflict on long-disappeared version of debtags * Ported to debhelper * Ported to libwibble 1.1 * Removed obsolete debian/README
-rw-r--r--CMakeLists.txt2
-rw-r--r--debian/README2
-rw-r--r--debian/changelog9
-rw-r--r--debian/compat2
-rw-r--r--debian/control19
-rw-r--r--debian/libept-dev.install7
-rw-r--r--debian/libept1.4.12.install2
-rw-r--r--ept/CMakeLists.txt6
-rw-r--r--ept/debtags/maint/sourcedir.cc50
-rw-r--r--ept/debtags/maint/sourcedir.h7
-rw-r--r--ept/debtags/maint/sourcedir.tcc15
-rw-r--r--ept/popcon/maint/sourcedir.cc26
-rw-r--r--ept/popcon/maint/sourcedir.h5
13 files changed, 66 insertions, 86 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c21139..423ed4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ include( FindDoxygen )
add_custom_target( unit )
-set( EPT_VERSION "1.0.9" )
+set( EPT_VERSION "1.0.10" )
# Get the soversion from libapt-pkg to include in our own
execute_process(
diff --git a/debian/README b/debian/README
deleted file mode 100644
index 168d971..0000000
--- a/debian/README
+++ /dev/null
@@ -1,2 +0,0 @@
-To make sure that all the data sources are working and up to date, you can run
-"ept-cache info" and follow the instructions.
diff --git a/debian/changelog b/debian/changelog
index d153a59..1746e80 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+libept (1.0.10) unstable; urgency=low
+
+ * Dropped Conflict on long-disappeared version of debtags
+ * Ported to debhelper
+ * Ported to libwibble 1.1
+ * Removed obsolete debian/README
+
+ -- Enrico Zini <enrico@debian.org> Thu, 24 Oct 2013 01:36:13 +0200
+
libept (1.0.9) unstable; urgency=low
[ Adam Conrad ]
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index 2162e43..b942020 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,14 @@ Section: libdevel
Priority: important
Maintainer: Enrico Zini <enrico@debian.org>
Uploaders: Petr Rockai <mornfall@debian.org>
-Build-Depends: cdbs, debhelper (>> 5), dh-buildinfo, doxygen, libapt-pkg-dev (>= 0.6.46.1), libwibble-dev (>= 0.1.23), libwibble-dev (<< 0.2), libtagcoll2-dev (>= 2.0.6), libtagcoll2-dev (<< 2.1), pkg-config, libxapian-dev (>= 1.0.5), cmake (>= 2.6)
-Standards-Version: 3.9.0.0
+Build-Depends:
+ debhelper (>= 9), dh-buildinfo,
+ cmake (>= 2.6), pkg-config, doxygen,
+ libapt-pkg-dev (>= 0.6.46.1),
+ libwibble-dev (>= 1.1), libwibble-dev (<< 2.0),
+ libtagcoll2-dev (>= 2.0.6), libtagcoll2-dev (<< 2.1),
+ libxapian-dev (>= 1.0.5)
+Standards-Version: 3.9.4.0
Vcs-Git: git://git.debian.org/git/debtags/libept.git
Vcs-Browser: http://git.debian.org/?p=debtags/libept.git
@@ -12,8 +18,11 @@ Package: libept-dev
Section: libdevel
Architecture: any
Recommends: pkg-config
-Depends: libept1.4.12 (= ${binary:Version}), libwibble-dev (>= 0.1.21), libwibble-dev (<< 0.2), libtagcoll2-dev (>= 2.0.6), libtagcoll2-dev (<< 2.1), libapt-pkg-dev (>= 0.6.46.1), libxapian-dev (>= 1.0.5), ${misc:Depends}
-Conflicts: debtags (<< 0.7)
+Depends:
+ libept1.4.12 (= ${binary:Version}),
+ libwibble-dev (>= 1.1), libwibble-dev (<< 2.0),
+ libtagcoll2-dev (>= 2.0.6), libtagcoll2-dev (<< 2.1),
+ libapt-pkg-dev (>= 0.6.46.1), libxapian-dev (>= 1.0.5), ${misc:Depends}
Description: High-level library for managing Debian package information
The library defines a very minimal framework in which many sources of data
about Debian packages can be implemented and queried together.
@@ -30,6 +39,8 @@ Description: High-level library for managing Debian package information
Package: libept1.4.12
Section: libs
Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: High-level library for managing Debian package information
The library defines a very minimal framework in which many sources of data
diff --git a/debian/libept-dev.install b/debian/libept-dev.install
index 18a4201..a6a8693 100644
--- a/debian/libept-dev.install
+++ b/debian/libept-dev.install
@@ -1,5 +1,4 @@
debian/tmp/usr/include/*
-debian/tmp/usr/lib/lib*.a
-debian/tmp/usr/lib/lib*.so
-debian/tmp/usr/lib/pkgconfig/*
-debian/tmp/usr/share/doc/libept-dev/*
+debian/tmp/usr/lib/*/lib*.a
+debian/tmp/usr/lib/*/lib*.so
+debian/tmp/usr/lib/*/pkgconfig/*
diff --git a/debian/libept1.4.12.install b/debian/libept1.4.12.install
index 389d6db..76a43a4 100644
--- a/debian/libept1.4.12.install
+++ b/debian/libept1.4.12.install
@@ -1 +1 @@
-debian/tmp/usr/lib/libept.so.1.aptpkg4.12
+debian/tmp/usr/lib/*/libept.so.1.aptpkg4.12
diff --git a/ept/CMakeLists.txt b/ept/CMakeLists.txt
index 201e87a..a74bf8e 100644
--- a/ept/CMakeLists.txt
+++ b/ept/CMakeLists.txt
@@ -76,10 +76,10 @@ add_custom_command(
COMMAND touch data-stamp )
install( TARGETS ept ept-static
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib )
+ LIBRARY DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}
+ ARCHIVE DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE} )
-install( FILES ${ept_BINARY_DIR}/libept.pc DESTINATION lib/pkgconfig )
+install( FILES ${ept_BINARY_DIR}/libept.pc DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig )
install( FILES ${h_top} DESTINATION include/ept )
install( FILES ${h_apt} DESTINATION include/ept/apt )
install( FILES ${h_debtags} DESTINATION include/ept/debtags )
diff --git a/ept/debtags/maint/sourcedir.cc b/ept/debtags/maint/sourcedir.cc
index 67ca7d7..cd1f1f9 100644
--- a/ept/debtags/maint/sourcedir.cc
+++ b/ept/debtags/maint/sourcedir.cc
@@ -15,7 +15,7 @@ namespace ept {
namespace debtags {
SourceDir::SourceDir(const std::string& path)
- : path(path)
+ : sys::fs::Directory(path)
{
}
SourceDir::~SourceDir()
@@ -52,21 +52,16 @@ SourceDir::FileType SourceDir::fileType(const std::string& name)
time_t SourceDir::timestamp()
{
- auto_ptr<sys::fs::Directory> dir;
- try {
- dir.reset(new sys::fs::Directory(path));
- } catch (wibble::exception::System& e) {
- return 0;
- }
+ if (!exists()) return 0;
time_t max = 0;
- for (sys::fs::Directory::const_iterator d = dir->begin(); d != dir->end(); ++d)
+ for (const_iterator d = begin(); d != end(); ++d)
{
string name = *d;
FileType type = fileType(name);
if (type == SKIP) continue;
- time_t ts = Path::timestamp(str::joinpath(path, name));
+ time_t ts = Path::timestamp(str::joinpath(m_path, name));
if (ts > max) max = ts;
}
@@ -75,21 +70,16 @@ time_t SourceDir::timestamp()
time_t SourceDir::vocTimestamp()
{
- auto_ptr<sys::fs::Directory> dir;
- try {
- dir.reset(new sys::fs::Directory(path));
- } catch (wibble::exception::System& e) {
- return 0;
- }
+ if (!exists()) return 0;
time_t max = 0;
- for (sys::fs::Directory::const_iterator d = dir->begin(); d != dir->end(); ++d)
+ for (const_iterator d = begin(); d != end(); ++d)
{
string name = *d;
FileType type = fileType(name);
if (type != VOC and type != VOCGZ) continue;
- time_t ts = Path::timestamp(str::joinpath(path, name));
+ time_t ts = Path::timestamp(str::joinpath(m_path, name));
if (ts > max) max = ts;
}
@@ -98,21 +88,16 @@ time_t SourceDir::vocTimestamp()
time_t SourceDir::tagTimestamp()
{
- auto_ptr<sys::fs::Directory> dir;
- try {
- dir.reset(new sys::fs::Directory(path));
- } catch (wibble::exception::System& e) {
- return 0;
- }
+ if (!exists()) return 0;
time_t max = 0;
- for (sys::fs::Directory::const_iterator d = dir->begin(); d != dir->end(); ++d)
+ for (const_iterator d = begin(); d != end(); ++d)
{
string name = *d;
FileType type = fileType(name);
if (type != TAG and type != TAGGZ) continue;
- time_t ts = Path::timestamp(str::joinpath(path, name));
+ time_t ts = Path::timestamp(str::joinpath(m_path, name));
if (ts > max) max = ts;
}
@@ -121,14 +106,9 @@ time_t SourceDir::tagTimestamp()
void SourceDir::readVocabularies(Vocabulary& out)
{
- auto_ptr<sys::fs::Directory> dir;
- try {
- dir.reset(new sys::fs::Directory(path));
- } catch (wibble::exception::System& e) {
- return;
- }
-
- for (sys::fs::Directory::const_iterator d = dir->begin(); d != dir->end(); ++d)
+ if (!exists()) return;
+
+ for (const_iterator d = begin(); d != end(); ++d)
{
string name = *d;
if (name[0] == '.') continue;
@@ -136,7 +116,7 @@ void SourceDir::readVocabularies(Vocabulary& out)
if (type == VOC)
{
// Read uncompressed data
- tagcoll::input::Stdio in(str::joinpath(path, name));
+ tagcoll::input::Stdio in(str::joinpath(m_path, name));
// Read the vocabulary
out.read(in);
@@ -144,7 +124,7 @@ void SourceDir::readVocabularies(Vocabulary& out)
else if (type == VOCGZ)
{
// Read compressed data
- tagcoll::input::Zlib in(str::joinpath(path, name));
+ tagcoll::input::Zlib in(str::joinpath(m_path, name));
// Read the vocabulary
out.read(in);
diff --git a/ept/debtags/maint/sourcedir.h b/ept/debtags/maint/sourcedir.h
index 3357c04..33d38e3 100644
--- a/ept/debtags/maint/sourcedir.h
+++ b/ept/debtags/maint/sourcedir.h
@@ -7,7 +7,7 @@
*/
/*
- * Copyright (C) 2003,2004,2005,2006,2007 Enrico Zini <enrico@debian.org>
+ * Copyright (C) 2003--2013 Enrico Zini <enrico@debian.org>
*
* 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
@@ -25,6 +25,7 @@
*/
#include <string>
+#include <wibble/sys/fs.h>
namespace ept {
namespace debtags {
@@ -34,13 +35,11 @@ class Vocabulary;
/**
* Access a directory containing Debtags data files
*/
-class SourceDir
+class SourceDir : public wibble::sys::fs::Directory
{
protected:
enum FileType { SKIP, TAG, VOC, TAGGZ, VOCGZ };
- std::string path;
-
// Check if a file name is a tag file, a vocabulary file or a file to skip.
// Please notice that it works on file names, not paths.
FileType fileType(const std::string& name);
diff --git a/ept/debtags/maint/sourcedir.tcc b/ept/debtags/maint/sourcedir.tcc
index 1d1c7f0..ab31e9b 100644
--- a/ept/debtags/maint/sourcedir.tcc
+++ b/ept/debtags/maint/sourcedir.tcc
@@ -19,21 +19,16 @@ namespace debtags {
template<typename OUT>
void SourceDir::readTags(OUT out)
{
- auto_ptr<sys::fs::Directory> dir;
- try {
- dir.reset(new sys::fs::Directory(path));
- } catch (wibble::exception::System& e) {
- return;
- }
-
- for (sys::fs::Directory::const_iterator d = dir->begin(); d != dir->end(); ++d)
+ if (!exists()) return;
+
+ for (const_iterator d = begin(); d != end(); ++d)
{
string name = *d;
FileType type = fileType(name);
if (type == TAG)
{
// Read uncompressed data
- tagcoll::input::Stdio in(path + "/" + name);
+ tagcoll::input::Stdio in(m_path + "/" + name);
// Read the collection
tagcoll::textformat::parse(in, out);
@@ -41,7 +36,7 @@ void SourceDir::readTags(OUT out)
else if (type == TAGGZ)
{
// Read compressed data
- tagcoll::input::Zlib in(path + "/" + name);
+ tagcoll::input::Zlib in(m_path + "/" + name);
// Read the collection
tagcoll::textformat::parse(in, out);
diff --git a/ept/popcon/maint/sourcedir.cc b/ept/popcon/maint/sourcedir.cc
index 471a9f7..c908edd 100644
--- a/ept/popcon/maint/sourcedir.cc
+++ b/ept/popcon/maint/sourcedir.cc
@@ -16,7 +16,7 @@ namespace ept {
namespace popcon {
SourceDir::SourceDir(const std::string& path)
- : path(path)
+ : sys::fs::Directory(path)
{
}
SourceDir::~SourceDir()
@@ -35,21 +35,16 @@ SourceDir::FileType SourceDir::fileType(const std::string& name)
time_t SourceDir::timestamp()
{
- auto_ptr<sys::fs::Directory> dir;
- try {
- dir.reset(new sys::fs::Directory(path));
- } catch (wibble::exception::System& e) {
- return 0;
- }
+ if (!exists()) return 0;
time_t max = 0;
- for (sys::fs::Directory::const_iterator d = dir->begin(); d != dir->end(); ++d)
+ for (const_iterator d = begin(); d != end(); ++d)
{
string name = *d;
FileType type = fileType(name);
if (type == SKIP) continue;
- time_t ts = Path::timestamp(str::joinpath(path, name));
+ time_t ts = Path::timestamp(str::joinpath(m_path, name));
if (ts > max) max = ts;
}
@@ -124,23 +119,18 @@ static void parseScores(tagcoll::input::Input& in, map<std::string, Score>& out,
bool SourceDir::readScores(map<std::string, Score>& out, size_t& submissions)
{
- auto_ptr<sys::fs::Directory> dir;
- try {
- dir.reset(new sys::fs::Directory(path));
- } catch (wibble::exception::System& e) {
- return false;
- }
+ if (!exists()) return false;
bool done = false;
- for (sys::fs::Directory::const_iterator d = dir->begin(); d != dir->end(); ++d)
+ for (const_iterator d = begin(); d != end(); ++d)
{
string name = *d;
FileType type = fileType(name);
if (type == RAW)
{
// Read uncompressed data
- tagcoll::input::Stdio in(str::joinpath(path, name));
+ tagcoll::input::Stdio in(str::joinpath(m_path, name));
// Read the scores
parseScores(in, out, submissions);
@@ -149,7 +139,7 @@ bool SourceDir::readScores(map<std::string, Score>& out, size_t& submissions)
else if (type == RAWGZ)
{
// Read compressed data
- tagcoll::input::Zlib in(str::joinpath(path, name));
+ tagcoll::input::Zlib in(str::joinpath(m_path, name));
// Read the scores
parseScores(in, out, submissions);
diff --git a/ept/popcon/maint/sourcedir.h b/ept/popcon/maint/sourcedir.h
index 9217fd1..eccb6f1 100644
--- a/ept/popcon/maint/sourcedir.h
+++ b/ept/popcon/maint/sourcedir.h
@@ -25,6 +25,7 @@
*/
#include <ept/popcon/popcon.h>
+#include <wibble/sys/fs.h>
#include <string>
#include <map>
@@ -34,13 +35,11 @@ namespace popcon {
/**
* Access a directory containing Debtags data files
*/
-class SourceDir
+class SourceDir : public wibble::sys::fs::Directory
{
protected:
enum FileType { SKIP, RAW, RAWGZ };
- std::string path;
-
// Check if a file name is a tag file, a vocabulary file or a file to skip.
// Please notice that it works on file names, not paths.
FileType fileType(const std::string& name);