diff --git a/CMakeLists.txt b/CMakeLists.txt index 05e51bfde..8dc46d710 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,23 +24,23 @@ else () endif () # Override the cryptopp search until we can get the qmake stuff sorted. -set(CRYPTOPP_INCLUDE_DIR "../cryptopp562" CACHE FILEPATH "" FORCE) -set(CRYPTOPP_LIBRARIES "../cryptopp562" CACHE FILEPATH "" FORCE) +#set(CRYPTOPP_INCLUDE_DIR "../cryptopp562" CACHE FILEPATH "" FORCE) +#set(CRYPTOPP_LIBRARIES "../cryptopp562" CACHE FILEPATH "" FORCE) # Look for availabe Crypto++ version and if it is >= 5.6.2 -if(CRYPTOPP_INCLUDE_DIR AND CRYPTOPP_LIBRARIES) - set(CRYPTOPP_FOUND TRUE) - message(STATUS "Found Crypto++: ${CRYPTOPP_INCLUDE_DIR}, ${CRYPTOPP_LIBRARIES}") -else() +#if(CRYPTOPP_INCLUDE_DIR AND CRYPTOPP_LIBRARIES) +# set(CRYPTOPP_FOUND TRUE) +# message(STATUS "Found Crypto++: ${CRYPTOPP_INCLUDE_DIR}, ${CRYPTOPP_LIBRARIES}") +#else() find_path(CRYPTOPP_INCLUDE_DIR cryptlib.h - /usr/include/crypto++ /usr/include/cryptopp - /usr/local/include/crypto++ + /usr/include/crypto++ /usr/local/include/cryptopp - /opt/local/include/crypto++ + /usr/local/include/crypto++ /opt/local/include/cryptopp + /opt/local/include/crypto++ ) - find_library(CRYPTOPP_LIBRARIES NAMES cryptopp + find_library(CRYPTOPP_LIBRARIES NAMES cryptoppeth cryptopp PATHS /usr/lib /usr/local/lib @@ -68,7 +68,7 @@ else() set(CRYPTOPP_LIBRARIES "../cryptopp562" CACHE FILEPATH "" FORCE) endif() mark_as_advanced(CRYPTOPP_INCLUDE_DIR CRYPTOPP_LIBRARIES) -endif() +#endif() if(CRYPTOPP_FOUND) include_directories(${CRYPTOPP_INCLUDE_DIR}) diff --git a/alephzero/alephzero.pro b/alephzero/alephzero.pro index 62e4f844e..807df74e4 100644 --- a/alephzero/alephzero.pro +++ b/alephzero/alephzero.pro @@ -14,9 +14,10 @@ CONFIG(debug, debug|release): DEFINES += ETH_DEBUG QMAKE_CXXFLAGS += -std=c++11 -QMAKE_LIBDIR += ../../cpp-ethereum-build/libethereum ../../secp256k1 ../../cryptopp562 -LIBS += -Wl,-rpath,../../cpp-ethereum-build/libethereum -Wl,-rpath,../../secp256k1 -Wl,-rpath,../../cryptopp562 -lethereum -lcryptopp -lminiupnpc -lsecp256k1 -lleveldb -lgmp -lboost_filesystem -lboost_system -INCLUDEPATH = ../../secp256k1/include ../../cpp-ethereum +INCLUDEPATH += ../../cpp-ethereum +QMAKE_LIBDIR += ../../cpp-ethereum-build/libethereum +CONFIG(debug, debug|release): LIBS += -Wl,-rpath,../../cpp-ethereum-build/libethereum +LIBS += -lethereum -lcryptoppeth -lminiupnpc -lsecp256k1 -lleveldb -lgmp -lboost_filesystem -lboost_system SOURCES += main.cpp \ MainWin.cpp diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 000000000..d9ffd1e35 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +cpp-ethereum for Debian +----------------------- + + + + -- Gav > Mon, 03 Feb 2014 14:50:20 +0000 diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 000000000..5d002af70 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,9 @@ +cpp-ethereum for Debian +----------------------- + + + + + + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..c7fe73c17 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +cpp-ethereum (0.1-1) raring; urgency=low + + * Initial release. + + -- Gav Wood Mon, 03 Feb 2014 14:50:20 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..45a4fb75d --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..ac70557ac --- /dev/null +++ b/debian/control @@ -0,0 +1,29 @@ +Source: cpp-ethereum +Section: science +Priority: extra +Maintainer: Gav Wood +Build-Depends: debhelper (>= 8.0.0), cmake, libgmp-dev, libcryptoppeth-dev, libboost-filesystem1.53-dev, libboost-mpi1.53-dev, libboost1.53-dev, libleveldb-dev, libminiupnpc-dev, qtbase5-dev, secp256k1eth-dev +Standards-Version: 3.9.4 +Homepage: http://ethereum.org +#Vcs-Git: git://git.debian.org/collab-maint/cpp-ethereum.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/cpp-ethereum.git;a=summary + +Package: libethereum +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libgmp, libcryptoppeth, libboost-filesystem1.53.0, libboost-mpi1.53.0, libleveldb, libminiupnpc, secp256k1eth +Description: The future of computational social contracts. + A long description of libethereum. + +Package: libethereum-dev +Section: libdevel +Architecture: any +Depends: libethereum (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, libgmp, libcryptoppeth, libboost-filesystem1.53.0, libboost-mpi1.53.0, libleveldb, libminiupnpc, secp256k1eth +Description: The future of computational social contracts. Dev Files. + A long description of libethereum. Dev Files. + +Package: alephzero +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libethereum (= ${binary:Version}), qtbase5 +Description: The Qt-based Ethereum GUI. + A long description of alephzero. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..fbbdb321d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,24 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: cpp-ethereum +Source: github.com/ethereum/cpp-ethereum + +Files: * +Copyright: 2014 Gav Wood +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/debian/docs b/debian/docs new file mode 100644 index 000000000..f31b08fec --- /dev/null +++ b/debian/docs @@ -0,0 +1,3 @@ +CodingStandards.txt +README.md +TODO diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..3202a570b --- /dev/null +++ b/debian/rules @@ -0,0 +1,38 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + + +%: + dh $@ + +override_dh_auto_configure: + cmake -DCMAKE_INSTALL_PREFIX=$(CURDIR)/debian/libethereum-dev/usr . + cd alephzero && qmake alephzero.pro INCLUDEPATH=$(CURDIR) QMAKE_LIBDIR=$(CURDIR)/libethereum + +override_dh_auto_build: + $(MAKE) -j8 + cd alephzero && $(MAKE) -j8 + +override_dh_auto_install: + $(MAKE) install + # Move the libs over to the non-dev package. + mkdir -p $(CURDIR)/debian/libethereum/usr + mv $(CURDIR)/debian/libethereum-dev/usr/lib $(CURDIR)/debian/libethereum/usr/lib + mkdir -p $(CURDIR)/debian/alephzero/usr/bin + install -m 755 -s alephzero/alephzero $(CURDIR)/debian/alephzero/usr/bin + diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index b8a7abbde..fd60633ad 100644 --- a/eth/CMakeLists.txt +++ b/eth/CMakeLists.txt @@ -2,9 +2,6 @@ cmake_policy(SET CMP0015 NEW) aux_source_directory(. SRC_LIST) -include_directories(../../secp256k1/include) -link_directories(../../secp256k1) - include_directories(../libethereum) link_directories(../libethereum) @@ -16,7 +13,7 @@ target_link_libraries(eth ethereum) target_link_libraries(eth miniupnpc) target_link_libraries(eth leveldb) target_link_libraries(eth secp256k1) -target_link_libraries(eth cryptopp) +target_link_libraries(eth ${CRYPTOPP_LIBRARIES}) target_link_libraries(eth gmp) target_link_libraries(eth boost_system) target_link_libraries(eth boost_filesystem) diff --git a/libethereum/CMakeLists.txt b/libethereum/CMakeLists.txt index c83ae1e10..66ce33dfd 100644 --- a/libethereum/CMakeLists.txt +++ b/libethereum/CMakeLists.txt @@ -1,18 +1,22 @@ cmake_policy(SET CMP0015 NEW) -include_directories(../../secp256k1/include) -link_directories(../../secp256k1) - aux_source_directory(. SRC_LIST) add_library(ethereum ${SRC_LIST}) +file(GLOB HEADERS "*.h") find_package(Threads REQUIRED) target_link_libraries(ethereum secp256k1) target_link_libraries(ethereum miniupnpc) target_link_libraries(ethereum leveldb) -target_link_libraries(ethereum cryptopp) +target_link_libraries(ethereum ${CRYPTOPP_LIBRARIES}) target_link_libraries(ethereum gmp) target_link_libraries(ethereum boost_system) target_link_libraries(ethereum boost_filesystem) target_link_libraries(ethereum ${CMAKE_THREAD_LIBS_INIT}) + +message("Installation path: ${CMAKE_INSTALL_PREFIX}") + +install( TARGETS ethereum ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) +install( FILES ${HEADERS} DESTINATION include/ethereum ) + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index cb5e19967..538696594 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,9 +2,6 @@ cmake_policy(SET CMP0015 NEW) aux_source_directory(. SRC_LIST) -include_directories(../../secp256k1/include) -link_directories(../../secp256k1) - include_directories(../libethereum) link_directories(../libethereum) @@ -14,7 +11,7 @@ find_package(Threads REQUIRED) target_link_libraries(testeth ethereum) target_link_libraries(testeth miniupnpc) -target_link_libraries(testeth cryptopp) +target_link_libraries(testeth ${CRYPTOPP_LIBRARIES}) target_link_libraries(testeth secp256k1) target_link_libraries(testeth gmp) target_link_libraries(testeth boost_system)