~ubuntu-branches/ubuntu/raring/clucene-core/raring-proposed

« back to all changes in this revision

Viewing changes to cmake/CreateClucenePackages.cmake

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2012-08-11 09:33:38 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120811093338-fgrx41ftqew3qt6a
Tags: 2.3.3.4-1
* New upstream release (Closes: #661703).
* Convert package to multiarch.
* Drop obsolete patches:
  - 01_add_missing_include_bug505667.diff
  - 02_posixness_fix_bug530308.diff
* Add patches:
  - Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
  - Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
  - Install-contribs-lib.patch
  - multiarch.patch
* Update debian/compat: bump to 8.
* Update debian/control:
  - update build dependencies (add cmake, libboost-dev and libz-dev).
  - bump Standards-Version to 3.9.3.
  - rename packages due to ABI bump: libclucene0ldbl -> libclucene-core1.
  - add libclucene-contribs1 package.
* Update debian/rules:
  - rewrite to use CMake.
  - add multiarch support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#Creates all the relevant packages
 
2
 
 
3
#Rules for version:
 
4
#MAJOR and MINOR versions are purely political
 
5
#REVISION version MUST be revised if the headers or compatibility change
 
6
#PATCH should be 0 unless a patch is made that doesn't affect the public signature (i.e. clients don't need to re-compile).
 
7
 
 
8
SET(CPACK_PACKAGE_VERSION_MAJOR ${CLUCENE_VERSION_MAJOR})
 
9
SET(CPACK_PACKAGE_VERSION_MINOR ${CLUCENE_VERSION_MINOR})
 
10
SET(CPACK_PACKAGE_VERSION_REVISION ${CLUCENE_VERSION_REVISION})
 
11
SET(CPACK_PACKAGE_VERSION_PATCH ${CLUCENE_VERSION_MAJOR})
 
12
 
 
13
SET(CPACK_PACKAGE_VERSION ${CLUCENE_VERSION})
 
14
SET(CPACK_PACKAGE_SOVERSION ${CLUCENE_SOVERSION})
 
15
 
 
16
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "library for full-featured text search engine (runtime)")
 
17
SET(CPACK_PACKAGE_VENDOR "Ben van Klinken")
 
18
SET(CPACK_PACKAGE_CONTACT "clucene-developers@lists.sourceforge.net")
 
19
SET(CPACK_PACKAGE_NAME "libclucene1")
 
20
 
 
21
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.PACKAGE")
 
22
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CLucene - a C++ search engine, ported from the popular Apache Lucene")
 
23
 
 
24
SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.PACKAGE")
 
25
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
 
26
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/README.PACKAGE")
 
27
 
 
28
#so, what are we going to install?
 
29
SET(CPACK_INSTALL_CMAKE_PROJECTS
 
30
  "${CMAKE_BINARY_DIR};clucene-core;ALL;/"
 
31
  "${CMAKE_BINARY_DIR};clucene-shared;ALL;/")
 
32
SET(CPACK_COMPONENTS_ALL development runtime)
 
33
SET(CPACK_GENERATOR "TGZ")
 
34
SET(CPACK_PACKAGE_FILE_NAME "clucene-core-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}")
 
35
 
 
36
IF(WIN32 AND NOT UNIX)
 
37
        SET(CPACK_SOURCE_GENERATOR "ZIP")
 
38
ELSE(WIN32 AND NOT UNIX)
 
39
        SET(CPACK_SOURCE_GENERATOR "TBZ2;TGZ")
 
40
ENDIF(WIN32 AND NOT UNIX)
 
41
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "clucene-core-${CPACK_PACKAGE_VERSION}-Source")
 
42
 
 
43
#specific packaging requirements:
 
44
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.4), libgcc1 (>= 1:4.1.1-21), libstdc++6 (>= 4.1.1-21), zlib1g")
 
45
SET(CPACK_DEBIAN_PACKAGE_SECTION "libs")
 
46
SET(CPACK_RPM_PACKAGE_LICENSE "Apache 2.0")
 
47
SET(CPACK_RPM_PACKAGE_GROUP "libs")
 
48
SET(CPACK_RPM_PACKAGE_REQUIRES "libz")
 
49
 
 
50
#don't include the current binary dir.
 
51
get_filename_component(clucene_BINARY_DIR_name ${clucene_BINARY_DIR} NAME)
 
52
SET(CPACK_SOURCE_IGNORE_FILES
 
53
  "/\\\\.svn/"
 
54
  "/\\\\.git/"
 
55
  "\\\\.swp$"
 
56
  "\\\\.#;/#"
 
57
  ".*~"
 
58
  ".*\\\\.tmp"
 
59
  ".*\\\\.save"
 
60
  "/${clucene_BINARY_DIR_name}/"
 
61
)
 
62
 
 
63
IF(WIN32 AND NOT UNIX)
 
64
  # There is a bug in NSI that does not handle full unix paths properly. Make
 
65
  # sure there is at least one set of four (4) backlasshes.
 
66
  SET(CPACK_GENERATOR "${CPACK_GENERATOR};NSIS")
 
67
  #SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
 
68
  #SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
 
69
  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} CLucene Core Library")
 
70
  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\clucene.sourceforge.net")
 
71
  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\clucene.sourceforge.net")
 
72
  SET(CPACK_NSIS_CONTACT "clucene-developers@lists.sourceforge.net")
 
73
  #SET(CPACK_NSIS_MODIFY_PATH ON)
 
74
ELSE(WIN32 AND NOT UNIX)
 
75
#  SET(CPACK_STRIP_FILES "bin/xxx")
 
76
  SET(CPACK_SOURCE_STRIP_FILES "")
 
77
ENDIF(WIN32 AND NOT UNIX)
 
78
#SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")
 
79
 
 
80
 
 
81
ADD_CUSTOM_TARGET(dist-package
 
82
    COMMAND rsync -avP -e ssh ${CPACK_PACKAGE_FILE_NAME}.* ustramooner@frs.sourceforge.net:uploads/
 
83
#    DEPENDS package
 
84
)
 
85
ADD_CUSTOM_TARGET(dist-package_source
 
86
    COMMAND rsync -avP -e ssh ${CPACK_SOURCE_PACKAGE_FILE_NAME}.* ustramooner@frs.sourceforge.net:uploads/
 
87
#    DEPENDS package_source
 
88
)
 
89
 
 
90
#this must be last
 
91
INCLUDE(CPack)