Skip to content

threeal/deb-cpack-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debian Package CPack Template

repository size license build status

This project contains a CPack template to build a Debian package of external third-party CMake projects. This project is created to simplify the deployment of third-party libraries/frameworks which are build using CMake but do not yet have an official Debian package to be used. This project works by including a third-party source code as a Git submodule, then including it as a CMake subdirectory, and last compile it as a Debian package.

Usage

Including the Third-party Source Code

  • Clone the third-party source code repository as a Git submodule.
    $ git submodule add https://github.com/user/something

    Optionally, you could specify the branch/tag to be used using -b option, see this.

  • If the Git submodule already exists, initialize it and pull the latest commits.
    $ git submodule update --init --recursive
  • Modify the CPack configuration in the CMakeLists.txt according to the current third-party source code information.

    See this guide for more information on CPack configuration for Debian package.

Building the Project

  • Create a build directory and move to it.
    $ mkdir build
    $ cd build
  • Configure CMake with the following options.
    $ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
  • Build the project.
    $ make

    Optionally, you could speed up the build process by specifying the parallel job using -j option, see this.

  • Build Debian packages.
    $ make package

Usage Examples

This list contains repositories that use the template from this repository.

License

This project is licensed under the MIT License

About

CPack template to build a Debian package of external third-party CMake projects

Topics

Resources

License

Stars

Watchers

Forks

Languages