--- jsoncpp-0.5.0.orig/Makefile +++ jsoncpp-0.5.0/Makefile @@ -14,31 +14,54 @@ # Object file directory OBJ_DIR = ./obj +# Phony declarations +#------------------- +.PHONY: install clean object_directory + # Macros #------- +# Tests for the lib directory +TEST_LIB = test -d /usr/lib/json +# Make the lib directory +MAKE_LIB = mkdir /usr/lib/json # Tests for the obj directory -TEST_OBJ = test -d obj +TEST_OBJ = test -d obj +# Tests for the absence of the obj directory +TEST_AGAINST_OBJ = test ! -d obj +# Tests for the absence of libjsoncpp.a +TEST_AGAINST_A = test ! -e libjsoncpp.a +# Tests for the absence of libjsoncpp.so +TEST_AGAINST_SO = test ! -e libjsoncpp.so # Makes the obj directory -MAKE_OBJ = mkdir obj +MAKE_OBJ = mkdir obj # Removes the obj directory -REM_OBJ = rm -r obj +REM_OBJ = rm -r obj all: object_directory json_reader.o json_writer.o json_value.o ar -r libjsoncpp.a obj/json_reader.o obj/json_writer.o obj/json_value.o + g++ -o libjsoncpp.so -shared obj/json_reader.o obj/json_writer.o obj/json_value.o json_reader.o: src/lib_json/json_reader.cpp - $(CXX) -I $(INC_DIR) -c -o obj/json_reader.o src/lib_json/json_reader.cpp + $(CXX) -I $(INC_DIR) -c -o obj/json_reader.o src/lib_json/json_reader.cpp -fPIC json_writer.o: src/lib_json/json_writer.cpp - $(CXX) -I $(INC_DIR) -c -o obj/json_writer.o src/lib_json/json_writer.cpp + $(CXX) -I $(INC_DIR) -c -o obj/json_writer.o src/lib_json/json_writer.cpp -fPIC json_value.o: src/lib_json/json_value.cpp - $(CXX) -I $(INC_DIR) -c -o obj/json_value.o src/lib_json/json_value.cpp + $(CXX) -I $(INC_DIR) -c -o obj/json_value.o src/lib_json/json_value.cpp -fPIC object_directory: $(TEST_OBJ) || $(MAKE_OBJ) install: - sudo cp -r include/json --target-directory=/usr/include - cp libjsoncpp.a /usr/lib/libjsoncpp.a + mkdir -p $(DESTDIR)/usr/include + mkdir -p $(DESTDIR)/usr/lib + cp -r include/json --target-directory=$(DESTDIR)/usr/include + cp libjsoncpp.a $(DESTDIR)/usr/lib/libjsoncpp.a + cp libjsoncpp.so $(DESTDIR)/usr/lib/libjsoncpp.so + +clean: + $(TEST_AGAINST_OBJ) || $(REM_OBJ) + $(TEST_AGAINST_A) || rm libjsoncpp.a + $(TEST_AGAINST_SO) || rm libjsoncpp.so --- jsoncpp-0.5.0.orig/debian/changelog +++ jsoncpp-0.5.0/debian/changelog @@ -0,0 +1,5 @@ +jsoncpp (0.5.0-2) lucid; urgency=low + + * Initial release (Closes: #nnnn) + + -- Nathan Osman Tue, 03 Aug 2010 15:00:27 -0700 --- jsoncpp-0.5.0.orig/debian/copyright +++ jsoncpp-0.5.0/debian/copyright @@ -0,0 +1,33 @@ +This work was packaged for Debian by: + + Nathan Osman on Tue, 03 Aug 2010 15:00:27 -0700 + +It was downloaded from + +Upstream Author(s): + + Baptiste Lepilleur + +Copyright: + + + +License: + + The json-cpp library and this documentation are in Public Domain. + +The Debian packaging is: + + Copyright (C) 2010 Nathan + +# Please chose a license for your packaging work. If the program you package +# uses a mainstream license, using the same license is the safest choice. +# Please avoid to pick license terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. +# If you just want it to be GPL version 3, leave the following lines in. + +and is licensed under the GPL version 3, +see `/usr/share/common-licenses/GPL-3'. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. --- jsoncpp-0.5.0.orig/debian/jsoncpp-dev.install +++ jsoncpp-0.5.0/debian/jsoncpp-dev.install @@ -0,0 +1,2 @@ +usr/include/* +usr/lib/lib*.a --- jsoncpp-0.5.0.orig/debian/libjsoncpp.install +++ jsoncpp-0.5.0/debian/libjsoncpp.install @@ -0,0 +1 @@ +usr/lib/lib*.so --- jsoncpp-0.5.0.orig/debian/rules +++ jsoncpp-0.5.0/debian/rules @@ -0,0 +1,13 @@ +#!/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. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --- jsoncpp-0.5.0.orig/debian/control +++ jsoncpp-0.5.0/debian/control @@ -0,0 +1,26 @@ +Source: jsoncpp +Priority: extra +Maintainer: Nathan Osman +Build-Depends: debhelper (>= 7) +Standards-Version: 3.8.3 +Section: libs +Homepage: http://jsoncpp.sf.net + +Package: jsoncpp-dev +Section: libdevel +Architecture: any +Depends: libjsoncpp (= ${binary:Version}) +Description: JSON parsing library for C++ + jsoncpp is a C++ library that makes it easy to + read / write JSON data. + . + This package contains the development tools necessary + to create applications that use jsoncpp. + +Package: libjsoncpp +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: JSON parsing library for C++ + jsoncpp is a C++ library that makes it easy to + read / write JSON data. --- jsoncpp-0.5.0.orig/debian/compat +++ jsoncpp-0.5.0/debian/compat @@ -0,0 +1 @@ +7 --- jsoncpp-0.5.0.orig/debian/README.source +++ jsoncpp-0.5.0/debian/README.source @@ -0,0 +1,9 @@ +jsoncpp for Debian +------------------ + + + + + + --- jsoncpp-0.5.0.orig/debian/docs +++ jsoncpp-0.5.0/debian/docs @@ -0,0 +1,2 @@ +README.txt +README.txt --- jsoncpp-0.5.0.orig/debian/jsoncpp-dev.dirs +++ jsoncpp-0.5.0/debian/jsoncpp-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include --- jsoncpp-0.5.0.orig/debian/libjsoncpp.dirs +++ jsoncpp-0.5.0/debian/libjsoncpp.dirs @@ -0,0 +1 @@ +usr/lib