source: qstopmotion/trunk/fuentes/debian/patches/makeBuild @ 4776

Last change on this file since 4776 was 4776, checked in by Juanma, 3 years ago

Updated to 2.3.2-1

File size: 10.9 KB
Line 
1Description: <short summary of the patch>
2 TODO: Put a short summary on the line above and replace this paragraph
3 with a longer explanation of this change. Complete the meta-information
4 with other relevant fields (see below for details). To make it easier, the
5 information below has been extracted from the changelog. Adjust it or drop
6 it.
7 .
8 qstopmotion (2.3.2-1~getdeb1) xenial; urgency=medium
9 .
10   * New upstream version
11       * Some spelling corrections.
12       * Update of the Czech translation.
13Author: Christoph Korn <christoph.korn@getdeb.net>
14
15---
16The information above should follow the Patch Tagging Guidelines, please
17checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
18are templates for supplementary fields that you might want to add:
19
20Origin: <vendor|upstream|other>, <url of original patch>
21Bug: <url in upstream bugtracker>
22Bug-Debian: https://bugs.debian.org/<bugnumber>
23Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
24Forwarded: <no|not-needed|url proving that it has been forwarded>
25Reviewed-By: <name and email of someone who approved the patch>
26Last-Update: <YYYY-MM-DD>
27
28--- qstopmotion-2.3.2.orig/CMakeLists.txt
29+++ qstopmotion-2.3.2/CMakeLists.txt
30@@ -364,6 +364,21 @@ SET(
31     linux/qstopmotion.1.gz      # Linux man page compressed
32 )
33 
34+SET(
35+    DEB_FILES
36+    deb/qstopmotion.xpm       # DEB Icon is installed in a separate step
37+    deb/changelog             # DEB changelog file
38+    deb/changelog.gz          # DEB changelog file compressed
39+    deb/copyright             # DEB copyright file
40+    deb/qstopmotion.menu      # DEB .menu is installed in a separate step for Debian systems
41+    deb/postinst              # DEB post installation script file, call update-menus
42+)
43+
44+SET(
45+    RPM_FILES
46+    rpm/qstopmotion.png       # RPM Icon is installed in a separate step
47+)
48+
49 ###############################################################################
50 # gPhoto2 support
51 #
52@@ -581,6 +596,8 @@ IF(UNIX AND NOT APPLE)
53     file(COPY ${ICON_FILES} DESTINATION "share/qstopmotion/")
54     file(COPY ${GENERAL_FILES} DESTINATION "share/qstopmotion/")
55     file(COPY ${UNIX_FILES} DESTINATION "share/qstopmotion/")
56+    file(COPY ${DEB_FILES} DESTINATION "share/qstopmotion/deb/")
57+    file(COPY ${RPM_FILES} DESTINATION "share/qstopmotion/rpm/")
58 ENDIF(UNIX AND NOT APPLE)
59 
60 ###############################################################################
61@@ -682,6 +699,52 @@ IF(UNIX AND NOT APPLE)
62     )
63 ENDIF(UNIX AND NOT APPLE)
64 
65+# installation on DEB systems
66+IF(CPACK_BINARY_DEB)
67+    message("Special task for deb package!")
68+   
69+    # installation of the icon file
70+    install(
71+        FILES "deb/qstopmotion.xpm"
72+        DESTINATION ${QSTOPMOTION_PIXMAP_INSTALL_DIR}
73+    )
74+
75+    # installation of the .menufile file
76+    install(
77+        FILES "deb/qstopmotion.menu"
78+        DESTINATION ${QSTOPMOTION_MENUFILE_INSTALL_DIR}
79+    )
80+
81+    # installation of the changelog file
82+    install(
83+        FILES "deb/changelog.gz"
84+        DESTINATION ${QSTOPMOTION_MANUAL_INSTALL_DIR}
85+    )
86+
87+    # installation of the copyright file
88+    install(
89+        FILES "deb/copyright"
90+        DESTINATION ${QSTOPMOTION_MANUAL_INSTALL_DIR}
91+    )
92+ENDIF(CPACK_BINARY_DEB)
93+
94+# installation on RPM systems
95+IF(CPACK_BINARY_RPM)
96+    message("Special task for rpm package!")
97+   
98+    # installation of the general-purpose files
99+    install(
100+        FILES ${GENERAL_FILES}
101+        DESTINATION ${QSTOPMOTION_GENERALS_INSTALL_DIR}
102+    )
103+
104+    # installation of the icon file
105+    install(
106+        FILES "rpm/qstopmotion.png"
107+        DESTINATION ${QSTOPMOTION_PIXMAP_INSTALL_DIR}
108+    )
109+ENDIF(CPACK_BINARY_RPM)
110+
111 # installation on Windows systems
112 IF(WIN32)
113     IF(CMAKE_CL_64)
114@@ -995,6 +1058,172 @@ SET(
115 # Run the application on the finish page
116 # SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "qstopmotion.exe"
117 
118+###############################################################################
119+# DEB package - Linux only (Debian, OpenSuse, Ubuntu, ...)
120+###############################################################################
121+
122+IF ("${LSB_DISTRIB}" MATCHES "Ubuntu|Debian")
123+    # We need to alter the architecture names as per distro rules
124+    IF ("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "i[3-6]86")
125+        SET(
126+            CPACK_PACKAGE_ARCHITECTURE
127+            "i386"
128+        )
129+    ENDIF ("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "i[3-6]86")
130+    IF ("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "x86_64")
131+        SET(
132+            CPACK_PACKAGE_ARCHITECTURE
133+            "amd64"
134+        )
135+    ENDIF ("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "x86_64")
136+    SET(
137+        CPACK_SYSTEM_NAME
138+        "${LSB_DISTRIB}-${CPACK_PACKAGE_ARCHITECTURE}"
139+    )
140+
141+    # Set the dependencies based on the distro version
142+    # thus only one package is build you must list here *any* depending libraries,
143+    # even if they are only used in one module
144+    IF ("${LSB_DISTRIB}" MATCHES "Ubuntu14.04")
145+        SET(
146+            CPACK_DEBIAN_PACKAGE_DEPENDS
147+            "libc6 (>=2.11), libavbin0 (>=7-1), libqt5core5 (>=5.2.1) | libqt5core5a (>=5.2.1), libqt5gui5 (>=5.2.1), libqt5widgets5 (>=5.2.1), libqt5xml5 (>=5.2.1), libv4l-0 (>=1.0.0), libgphoto2-6 (>=2.5.3), qt5-image-formats-plugins (>=5.2.1)"
148+        )
149+    ENDIF ("${LSB_DISTRIB}" MATCHES "Ubuntu14.04")
150+    IF ("${LSB_DISTRIB}" MATCHES "Ubuntu16.04")
151+        SET(
152+            CPACK_DEBIAN_PACKAGE_DEPENDS
153+            "libc6 (>=2.11), ffmpeg (>=2.8.6), libqt5core5 (>=5.3.2) | libqt5core5a (>=5.3.2), libqt5gui5 (>=5.3.2), libqt5widgets5 (>=5.3.2), libqt5xml5 (>=5.3.2), libv4l-0 (>=1.0.0), libgphoto2-6 (>=2.5.3), qt5-image-formats-plugins (>=5.3.2)"
154+        )
155+    ENDIF ("${LSB_DISTRIB}" MATCHES "Ubuntu16.04")
156+    IF ("${LSB_DISTRIB}" MATCHES "Debian7.*")
157+        SET(
158+            CPACK_DEBIAN_PACKAGE_DEPENDS
159+            "libc6 (>=2.11), ffmpeg (>=0.8.9), libqtcore4 (>=4.8.2), libqtgui4 (>=4.8.2), libqt4-xml (>=4.8.2), libv4l-0 (>=0.8.8), libgphoto2-2 (>=2.4.14), libgphoto2-port0 (>=2.4.14)"
160+        )
161+    ENDIF ("${LSB_DISTRIB}" MATCHES "Debian7.*")
162+    IF ("${LSB_DISTRIB}" MATCHES "Debian8.*")
163+        SET(
164+            CPACK_DEBIAN_PACKAGE_DEPENDS
165+            "libc6 (>=2.11), libav-tools (>=6:11.3), libqt5core5 (>=5.3.2) | libqt5core5a (>=5.3.2), libqt5gui5 (>=5.3.2), libqt5widgets5 (>=5.3.2), libqt5xml5 (>=5.3.2), libv4l-0 (>=1.0.0), libgphoto2-6 (>=2.5.3), qt5-image-formats-plugins (>=5.3.2)"
166+        )
167+    ENDIF ("${LSB_DISTRIB}" MATCHES "Debian8.*")
168+    IF (NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
169+        MESSAGE ("WARNING: ${LSB_DISTRIB} not supported yet.\nPlease set deps in CMakeLists.txt before packaging.")
170+    ENDIF (NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
171+ENDIF ("${LSB_DISTRIB}" MATCHES "Ubuntu|Debian")
172+MESSAGE("CPACK_DEBIAN_PACKAGE_DEPENDS: ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
173+
174+# Mandatory
175+# CPACK_DEBIAN_PACKAGE_NAME = CPACK_PACKAGE_NAME
176+MESSAGE("CPACK_DEBIAN_PACKAGE_NAME: ${CPACK_DEBIAN_PACKAGE_NAME}")
177+# CPACK_DEBIAN_PACKAGE_VERSION = CPACK_PACKAGE_VERSION
178+MESSAGE("CPACK_DEBIAN_PACKAGE_VERSION: ${CPACK_DEBIAN_PACKAGE_VERSION}")
179+# CPACK_DEBIAN_PACKAGE_ARCHITECTURE = dpkg output       # dpkg --print-architecture ???
180+MESSAGE("CPACK_DEBIAN_PACKAGE_ARCHITECTURE: ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
181+# CPACK_DEBIAN_PACKAGE_MAINTAINER = CPACK_PACKAGE_CONTACT
182+MESSAGE("CPACK_DEBIAN_PACKAGE_MAINTAINER: ${CPACK_DEBIAN_PACKAGE_MAINTAINER}")
183+SET(
184+    CPACK_DEBIAN_PACKAGE_DESCRIPTION
185+    "create stop motion animations\n qStopMotion can be used to create stop motion animations."
186+)
187+MESSAGE("CPACK_DEBIAN_PACKAGE_DESCRIPTION: ${CPACK_DEBIAN_PACKAGE_DESCRIPTION}")
188+SET(
189+    CPACK_DEBIAN_PACKAGE_SECTION
190+    "graphics"
191+)
192+MESSAGE("CPACK_DEBIAN_PACKAGE_SECTION: ${CPACK_DEBIAN_PACKAGE_SECTION}")
193+SET(
194+    CPACK_DEBIAN_PACKAGE_PRIORITY
195+    "optional"
196+)
197+MESSAGE("CPACK_DEBIAN_PACKAGE_PRIORITY: ${CPACK_DEBIAN_PACKAGE_PRIORITY}")
198+
199+# Options
200+
201+SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${QSTOPMOTION_HOMEPAGE})
202+# CPACK_DEBIAN_PACKAGE_SHLIBDEPS
203+# SET(CPACK_DEBIAN_PACKAGE_DEBUG "ON")
204+# CPACK_DEBIAN_PACKAGE_DEBUG
205+# CPACK_DEBIAN_PACKAGE_ENHANCES
206+# CPACK_DEBIAN_PACKAGE_BREAKS
207+# CPACK_DEBIAN_PACKAGE_CONFLICTS
208+# CPACK_DEBIAN_PACKAGE_PROVIDES
209+# CPACK_DEBIAN_PACKAGE_REPLACES
210+SET(
211+    CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
212+    "${CMAKE_SOURCE_DIR}/deb/postinst"
213+)
214+
215+###############################################################################
216+# RPM package - Linux only (Fedora, Red Hat, CentOS, Mandriva, ...)
217+###############################################################################
218+
219+# Mandatory
220+SET(
221+    CPACK_RPM_PACKAGE_SUMMARY
222+    ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}
223+)
224+MESSAGE("CPACK_RPM_PACKAGE_SUMMARY: ${CPACK_RPM_PACKAGE_SUMMARY}")
225+# CPACK_RPM_PACKAGE_NAME = CPACK_PACKAGE_NAME
226+MESSAGE("CPACK_RPM_PACKAGE_NAME: ${CPACK_RPM_PACKAGE_NAME}")
227+# CPACK_RPM_PACKAGE_VERSION = CPACK_PACKAGE_VERSION
228+MESSAGE("CPACK_RPM_PACKAGE_VERSION: ${CPACK_RPM_PACKAGE_VERSION}")
229+# SET(CPACK_RPM_PACKAGE_RELEASE "1")
230+MESSAGE("CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}")
231+SET(
232+    CPACK_RPM_PACKAGE_LICENSE
233+    "GPLv2"
234+)
235+MESSAGE("CPACK_RPM_PACKAGE_LICENSE: ${CPACK_RPM_PACKAGE_LICENSE}")
236+SET(
237+    CPACK_RPM_PACKAGE_GROUP
238+    "Applications/Multimedia"
239+)
240+MESSAGE("CPACK_RPM_PACKAGE_GROUP: ${CPACK_RPM_PACKAGE_GROUP}")
241+# CPACK_RPM_PACKAGE_VENDOR = CPACK_PACKAGE_VENDOR
242+MESSAGE("CPACK_RPM_PACKAGE_VENDOR: ${CPACK_RPM_PACKAGE_VENDOR}")
243+# CPACK_RPM_PACKAGE_MAINTAINER = CPACK_PACKAGE_CONTACT
244+MESSAGE("CPACK_RPM_PACKAGE_MAINTAINER: ${CPACK_RPM_PACKAGE_MAINTAINER}")
245+
246+# Options
247+# SET(CPACK_RPM_PACKAGE_ARCHITECTURE "noarch")
248+SET(
249+    CPACK_RPM_PACKAGE_URL
250+    ${QSTOPMOTION_HOMEPAGE}
251+)
252+# CPACK_RPM_PACKAGE_DESCRIPTION = CPACK_PACKAGE_DESCRIPTION_FILE
253+# CPACK_RPM_COMPRESSION_TYPE
254+# requireses must be in a aphabetic order
255+# Qt5: qt5-qtbase - Core, Concurrent, DBus, Network, Sql, Test, Xml
256+# Qt5: qt5-qtbase-gui - Gui, OpenGL, PrintSupport, Widgets, XcbQpa
257+# Qt5: qt5-qtimageformats - Qt5 image format plugins
258+# Qt5: qt5-qtmultimedia - Multimedia, MultimediaQuick, MultimediaWidgets
259+SET(
260+    CPACK_RPM_PACKAGE_REQUIRES
261+    "glibc >= 2.12, libgphoto2 >= 2.4.7, libv4l >= 0.6.3, qt5-qtbase >= 5.2.0, qt5-qtbase-gui >= 5.2.0, qt5-qtimageformats >= 5.2.0"
262+)
263+MESSAGE("CPACK_RPM_PACKAGE_REQUIRES: ${CPACK_RPM_PACKAGE_REQUIRES}")
264+# CPACK_RPM_PACKAGE_SUGGESTS
265+# CPACK_RPM_PACKAGE_PROVIDES
266+
267+# SET(CPACK_RPM_SPEC_INSTALL_POST "desktop-file-validate /usr/share/applications/qstopmotion.desktop")
268+
269+# SET(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "pre_install.sh")
270+# SET(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "post_install.sh")
271+# SET(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "pre_install.sh")
272+# SET(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "post_install.sh")
273+
274+# Prevent conflicts with the filesystem package
275+SET(
276+    CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
277+    "/usr/bin"
278+    "/usr/share/applications"
279+    "/usr/share/icons"
280+    "/usr/share/pixmaps"
281+    "/usr/share/man"
282+    "/usr/share/man/man1"
283+)
284 
285 ###############################################################################
286 # Activate packaging functionality
Note: See TracBrowser for help on using the repository browser.