Skip to content

Commit 46f9fa4

Browse files
Vitexusoz-agent
andcommitted
Modernize Debian packaging
- debhelper-compat 13, pkg-php-tools, phpab autoloader - Remove composer-debian dependency - Add autopkgtest, pkg-php-tools registration Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent a14c881 commit 46f9fa4

9 files changed

Lines changed: 45 additions & 40 deletions

File tree

composer.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,24 @@
3737
},
3838
"autoload": {
3939
"psr-4": {
40-
"VitexSoftware\\Raiffeisenbank\\" : "lib/",
41-
"VitexSoftware\\Raiffeisenbank\\Model\\" : "lib/Model",
42-
"VitexSoftware\\Raiffeisenbank\\RateLimit\\" : "lib/RateLimit",
43-
"VitexSoftware\\Raiffeisenbank\\PremiumAPI\\" : "lib/PremiumAPI"
44-
}
40+
"VitexSoftware\\Raiffeisenbank\\": "lib/",
41+
"VitexSoftware\\Raiffeisenbank\\Model\\": "lib/Model",
42+
"VitexSoftware\\Raiffeisenbank\\RateLimit\\": "lib/RateLimit",
43+
"VitexSoftware\\Raiffeisenbank\\PremiumAPI\\": "lib/PremiumAPI"
44+
}
4545
},
4646
"autoload-dev": {
4747
"psr-4": {
48-
"VitexSoftware\\Raiffeisenbank\\Test\\" : "test/",
49-
"VitexSoftware\\Raiffeisenbank\\Test\\Model\\" : "test/Model",
50-
"VitexSoftware\\Raiffeisenbank\\Test\\RateLimit\\" : "test/RateLimit",
51-
"VitexSoftware\\Raiffeisenbank\\Test\\PremiumAPI\\" : "test/PremiumAPI"
52-
}
48+
"VitexSoftware\\Raiffeisenbank\\Test\\": "test/",
49+
"VitexSoftware\\Raiffeisenbank\\Test\\Model\\": "test/Model",
50+
"VitexSoftware\\Raiffeisenbank\\Test\\RateLimit\\": "test/RateLimit",
51+
"VitexSoftware\\Raiffeisenbank\\Test\\PremiumAPI\\": "test/PremiumAPI"
52+
}
5353
},
5454
"config": {
5555
"allow-plugins": {
5656
"ergebnis/composer-normalize": true
5757
}
58-
}
59-
58+
},
59+
"type": "library"
6060
}

debian/Jenkinsfile.release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ if (!currentBuild.result || currentBuild.result == 'SUCCESS') {
111111
string(name: 'UPSTREAM_JOB', value: env.JOB_NAME),
112112
string(name: 'UPSTREAM_BUILD', value: env.BUILD_NUMBER),
113113
string(name: 'REMOTE_SSH', value: 'multirepo@repo.multiflexi.eu'),
114-
string(name: 'REMOTE_REPO_DIR', value: '/srv/repo'),
114+
string(name: 'REMOTE_REPO_DIR', value: '/var/lib/multirepo/public/multiflexi'),
115115
string(name: 'COMPONENT', value: 'main'),
116116
string(name: 'DEB_DIST', value: '')
117117
]

debian/changelog

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
php-vitexsoftware-rbczpremiumapi (1.5.3) UNRELEASED; urgency=medium
1+
php-vitexsoftware-rbczpremiumapi (1.5.3) unstable; urgency=medium
22

33
* Statementor rethrow the Api Execeptions
4+
* Modernize Debian packaging: debhelper-compat 13, pkg-php-tools, phpab
5+
* Remove composer-debian dependency
46

57
-- vitex <info@vitexsoftware.cz> Fri, 28 Nov 2025 14:28:59 +0100
68

debian/clean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/

debian/compat

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/composer.json

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"homepage": "https://vitexsoftware.com/"
99
}
1010
],
11-
"config": {
12-
"vendor-dir": "/var/lib/composer/php-vitexsoftware-rbczpremiumapi"
13-
},
1411
"autoload": {
1512
"psr-4": {
1613
"VitexSoftware\\Raiffeisenbank\\": "./",
@@ -24,20 +21,6 @@
2421
"guzzlehttp/guzzle": "^7.3",
2522
"deb/ease-core": "*"
2623
},
27-
"repositories": [
28-
{
29-
"type": "path",
30-
"url": "/usr/share/php/EaseCore"
31-
},
32-
{
33-
"type": "path",
34-
"url": "/usr/share/php/Raiffeisenbank"
35-
},
36-
{
37-
"type": "path",
38-
"url": "/usr/share/php/GuzzleHttp"
39-
}
40-
],
4124
"type": "library",
4225
"homepage": "https://github.com/VitexSoftware/php-vitexsoftware-rbczpremiumapi",
4326
"license": "MIT"

debian/control

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
Source: php-vitexsoftware-rbczpremiumapi
2-
Build-Depends: debhelper (>= 10), moreutils, jq, composer, phpdocumentor, php-curl, php-vitexsoftware-ease-core (>= 1.38), moreutils
3-
Section: web
4-
Standards-Version: 3.9.8
2+
Section: php
3+
Priority: optional
54
Maintainer: Vítězslav Dvořák <info@vitexsoftware.cz>
65
Uploaders: Vitex <vitex@hippy.cz>
7-
Priority: optional
6+
Build-Depends:
7+
debhelper-compat (= 13),
8+
pkg-php-tools (>= 1.7~),
9+
phpab,
10+
moreutils,
11+
jq,
12+
composer,
13+
phpdocumentor,
14+
php-curl,
15+
php-vitexsoftware-ease-core (>= 1.38),
16+
Standards-Version: 4.7.0
817
Homepage: https://github.com/VitexSoftware/php-vitexsoftware-rbczpremiumapi
18+
Rules-Requires-Root: no
919

1020
Package: php-vitexsoftware-rbczpremiumapi
11-
Depends: ${misc:Depends}, php-guzzlehttp-psr7, composer-debian, php-vitexsoftware-ease-core
1221
Architecture: all
22+
Depends:
23+
${misc:Depends},
24+
${phpcomposer:Debian-require},
25+
php-vitexsoftware-ease-core,
1326
Suggests: abraflexi-raiffasenbank
1427
Section: office
15-
Priority: optional
1628
Description: php client library for rbczpremiumapi
1729
See Accont Balance, Download statements etc.
1830

debian/rules

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PKG_PATH:=/usr/share/php/EaseCore
44
BUILD_DIR:=build
55

66
%:
7-
dh $@
7+
dh $@ --with phpcomposer
88

99
override_dh_prep:
1010
phpdoc -d lib --defaultpackagename=MainPackage
@@ -20,5 +20,10 @@ override_dh_auto_test:
2020

2121

2222
override_dh_install:
23-
jq '.version = "'`dpkg-parsechangelog | sed -n 's/^Version: //p'| sed 's/~.*//'`'"' debian/composer.json |sponge debian/composer.json
2423
dh_install
24+
phpab --output debian/php-vitexsoftware-rbczpremiumapi/usr/share/php/Raiffeisenbank/autoload.php \
25+
--basedir debian/php-vitexsoftware-rbczpremiumapi/usr/share/php/Raiffeisenbank \
26+
--tolerant \
27+
debian/php-vitexsoftware-rbczpremiumapi/usr/share/php/Raiffeisenbank
28+
install -m0755 -d debian/php-vitexsoftware-rbczpremiumapi/usr/share/pkg-php-tools/autoloaders
29+
echo 'deb rbczpremiumapi Raiffeisenbank/autoload.php' > debian/php-vitexsoftware-rbczpremiumapi/usr/share/pkg-php-tools/autoloaders/php-vitexsoftware-rbczpremiumapi

debian/tests/control

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Test-Command: php -r "require_once '/usr/share/php/Raiffeisenbank/autoload.php'; new VitexSoftware\\Raiffeisenbank\\ApiClient();"
2+
Depends: php-vitexsoftware-rbczpremiumapi, php-cli
3+
Restrictions: superficial

0 commit comments

Comments
 (0)