Skip to content

Commit b09f480

Browse files
committed
Initial debianization
1 parent 6c6f22f commit b09f480

127 files changed

Lines changed: 143 additions & 29914 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 0 additions & 183 deletions
This file was deleted.

debian/Jenkinsfile

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!groovy
2+
3+
String[] distributions = ['debian:bullseye', 'debian:bookworm', 'debian:trixie', 'ubuntu:focal', 'ubuntu:jammy', 'ubuntu:noble']
4+
5+
String vendor = 'vitexsoftware'
6+
String distribution = ''
7+
//String distroFamily = ''
8+
String distroCodename = ''
9+
String ver = ''
10+
11+
properties([
12+
copyArtifactPermission('*')
13+
])
14+
node() {
15+
ansiColor('xterm') {
16+
stage('SCM Checkout') {
17+
checkout scm
18+
}
19+
}
20+
}
21+
22+
distributions.each {
23+
distribution = it
24+
25+
println "Dist:" + distribution
26+
27+
def dist = distribution.split(':')
28+
distroCodename = dist[1]
29+
30+
def buildImage = ''
31+
32+
def artifacts = []
33+
34+
node {
35+
ansiColor('xterm') {
36+
stage('Checkout ' + distribution) {
37+
checkout scm
38+
buildImage = docker.image(vendor + '/' + distribution)
39+
sh 'git checkout debian/changelog'
40+
def version = sh (
41+
script: 'dpkg-parsechangelog --show-field Version',
42+
returnStdout: true
43+
).trim()
44+
ver = version + '.' + env.BUILD_NUMBER + '~' + distroCodename
45+
}
46+
stage('Build ' + distribution) {
47+
buildImage.inside {
48+
sh 'dch -b -v ' + ver + ' "' + env.BUILD_TAG + '"'
49+
sh 'sudo apt-get update --allow-releaseinfo-change'
50+
sh 'sudo chown jenkins:jenkins ..'
51+
sh 'debuild-pbuilder -i -us -uc -b'
52+
sh 'mkdir -p $WORKSPACE/dist/debian/ ; rm -rf $WORKSPACE/dist/debian/* ; for deb in $(cat debian/files | awk \'{print $1}\'); do mv "../$deb" $WORKSPACE/dist/debian/; done'
53+
artifacts = sh (
54+
script: "cat debian/files | awk '{print \$1}'",
55+
returnStdout: true
56+
).trim().split('\n')
57+
}
58+
}
59+
60+
stage('Test ' + distribution) {
61+
buildImage.inside {
62+
def debconf_debug = 0 //Set to "5" or "developer" to debug debconf
63+
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz; cd $WORKSPACE'
64+
sh 'echo "deb [trusted=yes] file://///$WORKSPACE/dist/debian/ ./" | sudo tee /etc/apt/sources.list.d/local.list'
65+
sh 'sudo apt-get update --allow-releaseinfo-change'
66+
sh 'echo "INSTALATION"'
67+
artifacts.each { deb_file ->
68+
if (deb_file.endsWith('.deb')) {
69+
sh 'echo -e "${GREEN} installing ' + deb_file + ' on `lsb_release -sc` ${ENDCOLOR} "'
70+
sh 'sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=' + debconf_debug + ' apt-get -y install $WORKSPACE/dist/debian/' + deb_file
71+
}
72+
}
73+
}
74+
}
75+
stage('Copy artifacts ' + distribution ) {
76+
buildImage.inside {
77+
artifacts.each { deb_file ->
78+
println "Copying artifact: " + deb_file
79+
archiveArtifacts artifacts: 'dist/debian/' + deb_file
80+
}
81+
sh 'mv $WORKSPACE/dist/debian/*.deb $WORKSPACE'
82+
}
83+
}
84+
}
85+
}
86+
}
87+

debian/control

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Source: php-spojenet-csas-accountsapi
2+
Section: unknown
3+
Priority: optional
4+
Maintainer: Vítězslav Dvořák <info@vitexsoftware.cz>
5+
Build-Depends: debhelper-compat (= 13)
6+
Standards-Version: 4.6.1
7+
Homepage: https://github.com/Spoje-NET/pohoda-csas
8+
Rules-Requires-Root: no
9+
Vcs-Git: git@github.com:Spoje-NET/pohoda-csas.git
10+
Vcs-Browser: https://github.com/Spoje-NET/pohoda-csas
11+
12+
Package: php-spojenet-csas-accountsapi
13+
Depends: ${misc:Depends}, php-guzzlehttp-psr7, composer-debian, php-vitexsoftware-ease-core
14+
Architecture: all
15+
Suggests: abraflexi-csas
16+
Section: office
17+
Priority: optional
18+
Description: php client library for csas-accountsapi
19+
See Accont Balance, Download statements etc.
20+
21+
Package: php-spojenet-csas-accountsapi-dev
22+
Depends: ${misc:Depends}, php-spojenet-csas-accountsapi, phpunit, php-vitexsoftware-ease-core-dev
23+
Architecture: all
24+
Section: devel
25+
Priority: optional
26+
Description: php client library for csas-accountsapi Unit Tests
27+
Only for developers
28+
29+
Package: php-spojenet-csas-accountsapi-doc
30+
Depends: ${misc:Depends}
31+
Architecture: all
32+
Suggests: www-browser
33+
Section: doc
34+
Priority: optional
35+
Description: php client library for csas-accountsapi Documentation
36+
php client library for csas-accountsapi documentation generated by phpDocumentor

debian/rules

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/make -f
2+
# You must remove unused comment lines for the released package.
3+
#export DH_VERBOSE = 1
4+
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5+
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
6+
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
7+
8+
%:
9+
dh $@
10+
11+
#override_dh_auto_install:
12+
# dh_auto_install -- prefix=/usr
13+
14+
#override_dh_install:
15+
# dh_install --list-missing -X.pyc -X.pyo
16+
17+
override_dh_install:
18+
jq '.version = "'`dpkg-parsechangelog | sed -n 's/^Version: //p'| sed 's/~.*//'`'"' debian/composer.json |sponge debian/composer.json
19+
dh_install

0 commit comments

Comments
 (0)