Browse Source

Modernize debian/ and add multiarch support and hardening flags.

R=daniel@pocock.pro
BUG=

Review URL: https://codereview.appspot.com/103800043
pull/567/head
Fredrik Roubert 12 years ago
committed by Mihaela Rosca
parent
commit
7c58e02a27
5 changed files with 25 additions and 11 deletions
  1. +1
    -1
      debian/compat
  2. +9
    -7
      debian/control
  3. +2
    -2
      debian/libphonenumber-dev.install
  4. +1
    -1
      debian/libphonenumber6.install
  5. +12
    -0
      debian/rules

+ 1
- 1
debian/compat View File

@ -1 +1 @@
7
9

+ 9
- 7
debian/control View File

@ -2,10 +2,12 @@ Source: libphonenumber
Priority: optional
Maintainer: Fredrik Roubert <roubert@google.com>
Build-Depends: ant,
ant-optional,
cmake,
debhelper (>= 7.0.50~),
debhelper (>= 9),
default-jdk | java-sdk,
javahelper (>= 0.34),
junit,
libboost-dev (>= 1.40),
libboost-system-dev (>= 1.40),
libboost-thread-dev (>= 1.40),
@ -14,7 +16,7 @@ Build-Depends: ant,
libprotobuf-dev (>= 2.4),
libre2-dev,
protobuf-compiler
Standards-Version: 3.9.1
Standards-Version: 3.9.5
Section: libs
Homepage: http://code.google.com/p/libphonenumber/
Vcs-Browser: http://code.google.com/p/libphonenumber/source/browse/
@ -24,21 +26,21 @@ Package: libphonenumber-dev
Section: libdevel
Architecture: any
Depends: libphonenumber6 (=${binary:Version}), ${misc:Depends}
Description: parsing/formatting/validating phone numbers - development
Description: parsing/formatting/validating phone numbers - development files
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: libphonenumber6
Section: libs
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: parsing/formatting/validating phone numbers - runtime
Description: parsing/formatting/validating phone numbers
Google's common C++ and Java library for parsing, formatting, storing and
validating international phone numbers.
.
This package contains the runtime libraries.
This package contains the runtime libraries for C++ users.
Package: libphonenumber-java
Section: java
@ -48,4 +50,4 @@ 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.
This package contains the runtime library JARs for Java users.

+ 2
- 2
debian/libphonenumber-dev.install View File

@ -1,3 +1,3 @@
usr/include/*
usr/lib/lib*.a
usr/lib/lib*.so
usr/lib/*/lib*.a
usr/lib/*/lib*.so

+ 1
- 1
debian/libphonenumber6.install View File

@ -1 +1 @@
usr/lib/lib*.so.*
usr/lib/*/lib*.so.*

+ 12
- 0
debian/rules View File

@ -26,6 +26,12 @@ CMAKE_FLAGS := -DCMAKE_INSTALL_PREFIX=/usr
CPP_BUILD := cpp/build
JAVA_BUILD := java/build
# CMake doesn't read CPPFLAGS and dh_auto commands are not used in this rules
# file so we have to manually set the flags here to ensure that hardening flags
# are used:
CFLAGS += $(CPPFLAGS)
CXXFLAGS += $(CPPFLAGS)
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
@ -55,8 +61,14 @@ ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
$(ANT) -f $(JAVA_BUILD).xml junit
endif
# Hack for multiarch: CMake doesn't really support libdir so we just manually
# move /usr/lib/* to a proper multiarch location.
override_dh_auto_install:
dh_auto_install --builddirectory=$(CPP_BUILD)
mkdir -p debian/tmp/usr/lib-$(DEB_HOST_MULTIARCH)
mv debian/tmp/usr/lib/* debian/tmp/usr/lib-$(DEB_HOST_MULTIARCH)
mv debian/tmp/usr/lib-$(DEB_HOST_MULTIARCH) \
debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
override_dh_auto_clean:
-test -d $(CPP_BUILD) && $(MAKE) -C $(CPP_BUILD) clean


Loading…
Cancel
Save