pkg: deb package support

This commit is contained in:
Gary Wang 2019-07-23 19:45:38 +08:00
parent 1b1e2989b3
commit 687f096ef9
11 changed files with 85 additions and 8 deletions

View file

@ -4,6 +4,15 @@ cmake_minimum_required(VERSION 3.9.5)
option(BUILD_UTILS "Build utilities" ON) option(BUILD_UTILS "Build utilities" ON)
# Version
if (NOT PROJECT_VERSION)
set(PROJECT_VERSION "0.0.1")
endif()
if (NOT PROJECT_VERSION_MAJOR)
set(PROJECT_VERSION_MAJOR 0)
endif()
# Find includes in corresponding build directories # Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed # Instruct CMake to run moc automatically when needed

5
debian/changelog vendored Normal file
View file

@ -0,0 +1,5 @@
gio-qt (0.0.1) unstable; urgency=medium
* Initial release
-- Gary Wang <wzc782970009@gmail.com> Tue, 23 Jul 2019 19:49:31 +0800

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
9

23
debian/control vendored Normal file
View file

@ -0,0 +1,23 @@
Source: gio-qt
Section: libs
Priority: optional
Maintainer: Gary Wang <wzc782970009@gmail.com>
Build-Depends:
debhelper (>= 9),
pkg-config,
qt5-default,
qt5-qmake,
libglib2.0-dev
Standards-Version: 3.9.8
Homepage: https://github.com/linuxdeepin/gio-qt
Package: libgio-qt
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Gio wrapper for Qt.
Package: libgio-qt-dev
Architecture: any
Depends: libgio-qt, ${misc:Depends}
Description: Development package for libgio-qt.

24
debian/copyright vendored Normal file
View file

@ -0,0 +1,24 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: gio-qt
Source: https://github.com/linuxdeepin/gio-qt
Files: *
Copyright: 2019-2019 Deepin Technology Co., Ltd.
License: GPL-3+
License: GPL-3+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

2
debian/libgio-qt-dev.install vendored Normal file
View file

@ -0,0 +1,2 @@
/usr/include/*
/usr/lib/*/pkgconfig

1
debian/libgio-qt.install vendored Normal file
View file

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

7
debian/rules vendored Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
export QT_SELECT = qt5
%:
dh $@ --parallel

1
debian/source/format vendored Normal file
View file

@ -0,0 +1 @@
3.0 (native)

View file

@ -1,10 +1,7 @@
# Populate a CMake variable with the sources # Populate a CMake variable with the sources
# TODO: portable headers? # TODO: portable headers?
# Some custom variables configure_file ("gio-qt.pc.in" "gio-qt.pc" @ONLY)
set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")
CONFIGURE_FILE("gio-qt.pc.in" "gio-qt.pc" @ONLY)
set (QGIO_PUBLIC_HEADER_FILES set (QGIO_PUBLIC_HEADER_FILES
dgiovolumemanager.h dgiovolumemanager.h
@ -30,6 +27,12 @@ add_library (gio-qt SHARED
${QGIO_PRIVATE_CPP_FILES} ${QGIO_PRIVATE_CPP_FILES}
) )
set_target_properties(
gio-qt PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
)
target_include_directories(gio-qt target_include_directories(gio-qt
PRIVATE PRIVATE
${GIOMM_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS}
@ -48,7 +51,7 @@ install (FILES ${QGIO_PUBLIC_HEADER_FILES}
DESTINATION include/gio-qt DESTINATION include/gio-qt
) )
install (TARGETS gio-qt DESTINATION lib) install_targets ("/${CMAKE_INSTALL_LIBDIR}" gio-qt)
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/gio-qt.pc" install (FILES "${CMAKE_CURRENT_BINARY_DIR}/gio-qt.pc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig

View file

@ -1,10 +1,11 @@
prefix=@DEST_DIR@ prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/lib exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/include includedir=${prefix}/include
Name: gio-qt Name: gio-qt
Description: Qt wrapper library for GIO. Description: Qt wrapper library for GIO.
Version: 0.1.0 Version: @PROJECT_VERSION@
Requires: glibmm-2.4, Qt5Core Requires: glibmm-2.4, Qt5Core
Libs: -L${libdir} -lgio-qt Libs: -L${libdir} -lgio-qt