cmake_minimum_required (VERSION 2.8)
project (libphonenumber)
+set (libphonenumber_VERSION_MAJOR 3)
+set (libphonenumber_VERSION_MINOR 8)
# Helper functions dealing with finding libraries and programs this library
# depends on.
add_library (phonenumber-shared SHARED ${SOURCES})
add_dependencies (phonenumber-shared generate-sources ${METADATA_TARGET})
set_target_properties (phonenumber-shared
- PROPERTIES OUTPUT_NAME "phonenumber")
- set_target_properties (phonenumber-shared PROPERTIES PREFIX "lib")
+ PROPERTIES
+ OUTPUT_NAME "phonenumber"
+ PREFIX "lib"
+ SOVERSION ${libphonenumber_VERSION_MAJOR}
+ VERSION ${libphonenumber_VERSION_MAJOR}.${libphonenumber_VERSION_MINOR})
endif ()
set (LIBRARY_DEPS ${PROTOBUF_LIB} ${ICU_LIB} ${Boost_LIBRARIES})
libphonenumber_test
phonenumber_testing ${GTEST_LIB} pthread
)
+add_custom_target(test COMMAND libphonenumber_test DEPENDS libphonenumber_test)
# Install rules.
install (FILES
DESTINATION include/base/
)
install (FILES src/base/memory/singleton.h
- DESTINATION include/base/memory)
-
+ DESTINATION include/base/memory/)
install (FILES src/base/synchronization/lock.h
- DESTINATION include/base/synchronization)
+ DESTINATION include/base/synchronization/)
install (TARGETS phonenumber LIBRARY DESTINATION lib/ ARCHIVE DESTINATION lib/)
--- /dev/null
+libphonenumber (3.8) unstable; urgency=low
+
+ * Initial Debian Package.
+
+ -- Fredrik Roubert <roubert@google.com> Tue, 16 Aug 2011 16:11:46 +0200
--- /dev/null
+Source: libphonenumber
+Priority: optional
+Maintainer: Fredrik Roubert <roubert@google.com>
+Build-Depends: ant,
+ cmake,
+ debhelper (>= 7.0.50~),
+ default-jdk | java-sdk,
+ javahelper (>= 0.34),
+ libboost-dev (>= 1.40),
+ libboost-thread-dev (>= 1.40),
+ libgtest-dev,
+ libicu-dev (>= 4.4),
+ libprotobuf-dev (>= 2.4),
+ libre2-dev,
+ protobuf-compiler
+Standards-Version: 3.9.1
+Section: libs
+Homepage: http://code.google.com/p/libphonenumber/
+Vcs-Browser: http://code.google.com/p/libphonenumber/source/browse/
+Vcs-Svn: http://libphonenumber.googlecode.com/svn/trunk/
+
+Package: libphonenumber-dev
+Section: libdevel
+Architecture: any
+Depends: libphonenumber3 (=${binary:Version}), ${misc:Depends}
+Description: parsing/formatting/validating phone numbers - development
+ Google's common C++ and Java library for parsing, formatting, storing and
+ validating international phone numbers.
+ .
+ This package contains the static libraries and include files.
+
+Package: libphonenumber3
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: parsing/formatting/validating phone numbers - runtime
+ Google's common C++ and Java library for parsing, formatting, storing and
+ validating international phone numbers.
+ .
+ This package contains the runtime libraries.
+
+Package: libphonenumber-java
+Section: java
+Architecture: all
+Depends: ${java:Depends}, ${misc:Depends}
+Description: parsing/formatting/validating phone numbers - java
+ Google's common C++ and Java library for parsing, formatting, storing and
+ validating international phone numbers.
+ .
+ This package contains the JAR files.
--- /dev/null
+This work was packaged for Debian by:
+
+ Fredrik Roubert <roubert@google.com> on Tue, 16 Aug 2011 16:11:46 +0200
+
+It was downloaded from:
+
+ http://code.google.com/p/libphonenumber/
+
+Copyright:
+
+ Copyright (C) 2011 The Libphonenumber Authors
+
+License:
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+On Debian systems, the complete text of the Apache License, Version 2.0
+can be found in `/usr/share/common-licenses/Apache-2.0'.
--- /dev/null
+usr/include/*
+usr/lib/lib*.a
+usr/lib/lib*.so
--- /dev/null
+java/build/jar/libphonenumber.jar
--- /dev/null
+usr/lib/lib*.so.*
--- /dev/null
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Copyright (C) 2011 The Libphonenumber Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+ANT ?= ant
+CMAKE ?= cmake
+JAVA_HOME ?= /usr/lib/jvm/default-java
+
+CMAKE_FLAGS := -DCMAKE_INSTALL_PREFIX=/usr
+CPP_BUILD := cpp/build
+JAVA_BUILD := java/build
+
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+%:
+ dh $@ --with javahelper
+
+override_dh_auto_configure:
+ mkdir -p $(CPP_BUILD) && cd $(CPP_BUILD) && $(CMAKE) $(CMAKE_FLAGS) ..
+
+override_dh_auto_build:
+ $(MAKE) -C $(CPP_BUILD) phonenumber phonenumber-shared
+ $(ANT) -f $(JAVA_BUILD).xml jar
+
+override_dh_auto_test:
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+ $(MAKE) -C $(CPP_BUILD) test
+ $(ANT) -f $(JAVA_BUILD).xml junit
+endif
+
+override_dh_auto_install:
+ dh_auto_install --builddirectory=$(CPP_BUILD)
+
+override_dh_auto_clean:
+ -test -d $(CPP_BUILD) && $(MAKE) -C $(CPP_BUILD) clean
+ -$(ANT) -f $(JAVA_BUILD).xml clean
--- /dev/null
+3.0 (native)