From 7112e2e3762cb6f455020c94e3287d93087765b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 20 Nov 2014 23:35:05 -0500
Subject: [PATCH] rename to opendht

---
 Makefile.am                             |  2 +-
 README.md                               |  6 +++---
 configure.ac                            |  6 ++++--
 dhtcpp.pc.in                            |  9 ---------
 include/{dht.h => opendht.h}            | 10 +++++-----
 include/{dhtcpp => opendht}/crypto.h    |  0
 include/{dhtcpp => opendht}/dht.h       |  0
 include/{dhtcpp => opendht}/dhtrunner.h |  0
 include/{dhtcpp => opendht}/infohash.h  |  0
 include/{dhtcpp => opendht}/securedht.h |  0
 include/{dhtcpp => opendht}/serialize.h |  0
 include/{dhtcpp => opendht}/value.h     |  0
 opendht.pc.in                           |  9 +++++++++
 src/Makefile.am                         | 24 ++++++++++++------------
 14 files changed, 34 insertions(+), 32 deletions(-)
 delete mode 100644 dhtcpp.pc.in
 rename include/{dht.h => opendht.h} (90%)
 rename include/{dhtcpp => opendht}/crypto.h (100%)
 rename include/{dhtcpp => opendht}/dht.h (100%)
 rename include/{dhtcpp => opendht}/dhtrunner.h (100%)
 rename include/{dhtcpp => opendht}/infohash.h (100%)
 rename include/{dhtcpp => opendht}/securedht.h (100%)
 rename include/{dhtcpp => opendht}/serialize.h (100%)
 rename include/{dhtcpp => opendht}/value.h (100%)
 create mode 100644 opendht.pc.in

diff --git a/Makefile.am b/Makefile.am
index cce6cbcf..162f95fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,4 +9,4 @@ EXTRA_DIST = \
 			$(DOC_FILES)
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = dhtcpp.pc
+pkgconfig_DATA = opendht.pc
diff --git a/README.md b/README.md
index 7b33b54a..df30b6c6 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-DhtCpp
+OpenDHT
 ===
 A lightweight C++11 Distributed Hash Table implementation
 
@@ -33,7 +33,7 @@ TODO
 Examples
 -
 ```c++
-#include <dht.h>
+#include <opendht.h>
 
 int main() {
     dht::DhtRunner node;
@@ -81,5 +81,5 @@ sudo make install
 How-to build a simple client app
 -
 ```bash
-g++ main.cpp -std=c++11 -ldhtcpp -lgnutls
+g++ main.cpp -std=c++11 -lopendht -lgnutls
 ```
diff --git a/configure.ac b/configure.ac
index 3ecd8f20..94f1fdf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,11 @@
-AC_INIT(dhtcpp, 0.1)
+AC_INIT(opendht, 0.1)
 AC_CONFIG_AUX_DIR(ac)
 AM_INIT_AUTOMAKE([foreign])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 
+CXXFLAGS=-O3
+
 AC_PROG_CC
 AC_PROG_CXX
 AM_PROG_AR
@@ -16,5 +18,5 @@ AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
 PKG_PROG_PKG_CONFIG()
 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.1])
 
-AC_CONFIG_FILES([Makefile src/Makefile dhtcpp.pc])
+AC_CONFIG_FILES([Makefile src/Makefile opendht.pc])
 AC_OUTPUT
diff --git a/dhtcpp.pc.in b/dhtcpp.pc.in
deleted file mode 100644
index a4381383..00000000
--- a/dhtcpp.pc.in
+++ /dev/null
@@ -1,9 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-Name: DhtCpp
-Description: Lightweight C++11 Distributed Hash Table library
-Version: @VERSION@
-Libs: -L${libdir} -ldhtcpp
-Cflags: -I${includedir}
\ No newline at end of file
diff --git a/include/dht.h b/include/opendht.h
similarity index 90%
rename from include/dht.h
rename to include/opendht.h
index d1ed824b..fb49b559 100644
--- a/include/dht.h
+++ b/include/opendht.h
@@ -30,8 +30,8 @@
 
 #pragma once
 
-#include "dhtcpp/dht.h"
-#include "dhtcpp/value.h"
-#include "dhtcpp/infohash.h"
-#include "dhtcpp/securedht.h"
-#include "dhtcpp/dhtrunner.h"
+#include "opendht/dht.h"
+#include "opendht/value.h"
+#include "opendht/infohash.h"
+#include "opendht/securedht.h"
+#include "opendht/dhtrunner.h"
diff --git a/include/dhtcpp/crypto.h b/include/opendht/crypto.h
similarity index 100%
rename from include/dhtcpp/crypto.h
rename to include/opendht/crypto.h
diff --git a/include/dhtcpp/dht.h b/include/opendht/dht.h
similarity index 100%
rename from include/dhtcpp/dht.h
rename to include/opendht/dht.h
diff --git a/include/dhtcpp/dhtrunner.h b/include/opendht/dhtrunner.h
similarity index 100%
rename from include/dhtcpp/dhtrunner.h
rename to include/opendht/dhtrunner.h
diff --git a/include/dhtcpp/infohash.h b/include/opendht/infohash.h
similarity index 100%
rename from include/dhtcpp/infohash.h
rename to include/opendht/infohash.h
diff --git a/include/dhtcpp/securedht.h b/include/opendht/securedht.h
similarity index 100%
rename from include/dhtcpp/securedht.h
rename to include/opendht/securedht.h
diff --git a/include/dhtcpp/serialize.h b/include/opendht/serialize.h
similarity index 100%
rename from include/dhtcpp/serialize.h
rename to include/opendht/serialize.h
diff --git a/include/dhtcpp/value.h b/include/opendht/value.h
similarity index 100%
rename from include/dhtcpp/value.h
rename to include/opendht/value.h
diff --git a/opendht.pc.in b/opendht.pc.in
new file mode 100644
index 00000000..b98f6fbb
--- /dev/null
+++ b/opendht.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+Name: OpenDHT
+Description: C++ Distributed Hash Table library
+Version: @VERSION@
+Libs: -L${libdir} -lopendht
+Cflags: -I${includedir}
diff --git a/src/Makefile.am b/src/Makefile.am
index da89a5e1..f5c25162 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,9 +1,9 @@
-lib_LTLIBRARIES = libdhtcpp.la
+lib_LTLIBRARIES = libopendht.la
 
-AM_CPPFLAGS = -I../include/dhtcpp
-libdhtcpp_la_CXXFLAGS = @CXXFLAGS@
+AM_CPPFLAGS = -I../include/opendht
+libopendht_la_CXXFLAGS = @CXXFLAGS@
 
-libdhtcpp_la_SOURCES = \
+libopendht_la_SOURCES = \
         dht.cpp \
         infohash.cpp \
         value.cpp \
@@ -12,11 +12,11 @@ libdhtcpp_la_SOURCES = \
         dhtrunner.cpp
 
 nobase_include_HEADERS = \
-        ../include/dht.h \
-        ../include/dhtcpp/dht.h \
-        ../include/dhtcpp/infohash.h \
-        ../include/dhtcpp/value.h \
-        ../include/dhtcpp/crypto.h \
-        ../include/dhtcpp/securedht.h \
-        ../include/dhtcpp/dhtrunner.h \
-        ../include/dhtcpp/serialize.h
+        ../include/opendht.h \
+        ../include/opendht/dht.h \
+        ../include/opendht/infohash.h \
+        ../include/opendht/value.h \
+        ../include/opendht/crypto.h \
+        ../include/opendht/securedht.h \
+        ../include/opendht/dhtrunner.h \
+        ../include/opendht/serialize.h
-- 
GitLab