forked from zeromq/zproject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zproject_debian.gsl
167 lines (151 loc) · 5.02 KB
/
zproject_debian.gsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# Generate debian recipes for project
#
# This is a code generator built using the iMatix GSL code generation
# language. See https://github.com/imatix/gsl for details.
#
# Copyright (c) the Contributors as noted in the AUTHORS file.
# This file is part of zproject.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
register_target ("debian", "packaging for Debian")
.macro target_debian
.directory.create ('packaging/debian')
.output "packaging/debian/changelog"
$(project.name:lower) ($(->version.major).$(->version.minor).$(->version.patch)) UNRELEASED; urgency=low
* Initial packaging.
-- $(project.name) Developers <$(project.email)> Wed, 31 Dec 2014 00:00:00 +0000
.output "packaging/debian/compat"
9
.output "packaging/debian/control"
#
# $(project.name) - $(project.description?'':)
#
. for project.license
# $(string.trim (license.):block )
. endfor
Source: $(string.replace (project.name, "_|-"):lower)
Section: net
Priority: optional
Maintainer: $(project.name) Developers <$(project.email)>
Standards-Version: 3.9.7
Build-Depends: debhelper (>= 9),
pkg-config,
dh-autoreconf,
.for project.use
.if use.project = "libzmq"
libzmq5-dev,
.elsif defined(use.debian_name)
$(use.debian_name),
.elsif regexp.match("^lib", use.libname)
$(string.replace (use.libname, "_|-"))-dev,
.else
lib$(string.replace (use.libname, "_|-"))-dev,
.endif
.endfor
dh-autoreconf,
systemd,
dh-systemd
.if project.exports_classes
Package: $(string.replace (project.libname, "_|-"))$(project->version.major)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: $(project.name)
This package contains shared library for $(project.name): $(project.description)
Package: $(string.replace (project.libname, "_|-"))-dev
Architecture: any
Section: libdevel
Depends:
.for project.use
.if use.project = "libzmq"
libzmq5-dev,
.elsif defined(use.debian_name)
$(use.debian_name),
.elsif regexp.match("^lib", use.libname)
$(string.replace (use.libname, "_|-"))-dev,
.else
lib$(string.replace (use.libname, "_|-"))-dev,
.endif
.endfor
$(string.replace (project.libname, "_|-"))$(project->version.major) (= ${binary:Version})
Description: development files for $(project.name)
This package contains development files for $(project.name): $(project.description)
.endif
.if project.has_main
Package: $(string.replace (project.name, "_|-"):lower)
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: $(project.description)
Main package for $(project.name): $(project.description)
.endif
Package: $(string.replace (project.name, "_|-"):lower)-dbg
Architecture: any
Section: debug
Priority: extra
Depends:
.if project.has_main
$(string.replace (project.name, "_|-"):lower) (= ${binary:Version}),
.else
$(string.replace (project.libname, "_|-"))$(project->version.major) (= ${binary:Version}),
.endif
${misc:Depends}
Description: debugging symbols for $(project.name)
This package contains the debugging symbols for $(project.name) : $(project.description).
.output "packaging/debian/copyright"
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: $(project.name)
Files: *
Copyright: 2015- $(project.name) Developers <$(project.email)>
License: $(project.name)_license
. for project.license
$(string.trim (license.):block )
. endfor
.output "packaging/debian/rules"
#!/usr/bin/make -f
# -*- makefile -*-
override_dh_strip:
dh_strip --dbg-package=$(string.replace (project.name, "_|-"):lower)-dbg
override_dh_auto_test:
echo "Skipped for now"
override_dh_auto_configure:
dh_auto_configure -- --with-systemd-units
%:
dh $@ --with autoreconf,systemd
.if project.has_main
. output ("packaging/debian/$(string.replace (project.name, "_|-"):lower).install")
.# generate binary names
. for project.main where scope = "public"
usr/bin/$(main.name)
. if file.exists ("src/$(main.name).cfg.example")
etc/$(project.name)/$(main.name).cfg.example
. endif
. endfor
. for project.bin
usr/bin/$(bin.name)
. endfor
.# generate service file names
. for project.main where main.service ?= 1 | main.services ?= 1
. if main.no_config ?= 0
etc/$(project.name)/$(main.name).cfg
. endif
usr/lib/systemd/system/$(main.name)*.service
. endfor
. for project.service
lib/systemd/system/$(service.name)*.service
. endfor
.for project.main where defined (main->extra)
. for extra
$(extra.path)/$(extra.name)
. endfor
.endfor
.endif
.if project.exports_classes
. output ("packaging/debian/$(string.replace (project.libname, "_|-"))$(project->version.major).install")
usr/lib/*/$(project.libname).so.*
. output ("packaging/debian/$(string.replace (project.libname, "_|-"))-dev.install")
usr/include/*
usr/lib/*/$(project.libname).so
usr/lib/*/pkgconfig/$(project.libname).pc
.endif
.endmacro