Skip to content

Commit 83e0e5f

Browse files
Vitexusoz-agent
andcommitted
Modernize Debian packaging
- debhelper-compat (= 13), pkg-php-tools, phpab - Remove old compat file - Standards-Version 4.7.0, Section php Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 0e0dbc4 commit 83e0e5f

9 files changed

Lines changed: 171 additions & 56 deletions

File tree

WARP.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# WARP.md - Working AI Reference for ipex-b2b
2+
3+
## Project Overview
4+
**Type**: PHP Project/Debian Package
5+
**Purpose**: ![Ipex-b2b Logo](https://github.com/Spoje-NET/Ipex-b2b/raw/master/ipex-b2b-logo.png "Project Logo")
6+
**Status**: Active
7+
**Repository**: git@github.com:Spoje-NET/ipex-b2b.git
8+
9+
## Key Technologies
10+
- PHP
11+
- Composer
12+
- Debian Packaging
13+
14+
## Architecture & Structure
15+
```
16+
ipex-b2b/
17+
├── src/ # Source code
18+
├── tests/ # Test files
19+
├── docs/ # Documentation
20+
└── ...
21+
```
22+
23+
## Development Workflow
24+
25+
### Prerequisites
26+
- Development environment setup
27+
- Required dependencies
28+
29+
### Setup Instructions
30+
```bash
31+
# Clone the repository
32+
git clone git@github.com:Spoje-NET/ipex-b2b.git
33+
cd ipex-b2b
34+
35+
# Install dependencies
36+
composer install
37+
```
38+
39+
### Build & Run
40+
```bash
41+
dpkg-buildpackage -b -uc
42+
```
43+
44+
### Testing
45+
```bash
46+
composer test
47+
```
48+
49+
## Key Concepts
50+
- **Main Components**: Core functionality and modules
51+
- **Configuration**: Configuration files and environment variables
52+
- **Integration Points**: External services and dependencies
53+
54+
## Common Tasks
55+
56+
### Development
57+
- Review code structure
58+
- Implement new features
59+
- Fix bugs and issues
60+
61+
### Deployment
62+
- Build and package
63+
- Deploy to target environment
64+
- Monitor and maintain
65+
66+
## Troubleshooting
67+
- **Common Issues**: Check logs and error messages
68+
- **Debug Commands**: Use appropriate debugging tools
69+
- **Support**: Check documentation and issue tracker
70+
71+
## Additional Notes
72+
- Project-specific conventions
73+
- Development guidelines
74+
- Related documentation

composer.json

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
11
{
2-
"name": "spojenet/ipexb2b",
3-
"description": "PHP Based Library for easy interaction with IPEX.cz JSON api",
4-
"license": "MIT",
5-
"authors": [
6-
{
7-
"name": "Vítězslav Dvořák",
8-
"email": "vitex@arachne.cz"
9-
}
10-
],
11-
"require": {
12-
"php": ">=8.0",
13-
"ext-curl": "*",
14-
"vitexsoftware/ease-core": "^1.49"
15-
},
16-
"autoload": {
17-
"psr-4": {
18-
"IPEXB2B\\": "src/IPEXB2B/"
19-
}
20-
},
21-
"autoload-dev": {
22-
"psr-4": {
23-
"Test\\Ease\\": "vendor/vitexsoftware/ease-core/tests/src/Ease",
24-
"Test\\IPEXB2B\\": "testing/src/IPEXB2B/",
25-
"Test\\": "testing/"
26-
}
27-
},
28-
"require-dev": {
29-
"phpunit/phpunit": "*",
30-
"phpstan/phpstan": "*",
31-
"friendsofphp/php-cs-fixer": "^3.92",
32-
"ergebnis/composer-normalize": "^2.48",
33-
"ergebnis/php-cs-fixer-config": "^6.58"
34-
},
35-
"config": {
36-
"allow-plugins": {
37-
"ergebnis/composer-normalize": true
38-
}
2+
"name": "spojenet/ipexb2b",
3+
"description": "PHP Based Library for easy interaction with IPEX.cz JSON api",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Vítězslav Dvořák",
8+
"email": "vitex@arachne.cz"
399
}
10+
],
11+
"require": {
12+
"php": ">=8.0",
13+
"ext-curl": "*",
14+
"vitexsoftware/ease-core": "^1.49"
15+
},
16+
"autoload": {
17+
"psr-4": {
18+
"IPEXB2B\\": "src/IPEXB2B/"
19+
}
20+
},
21+
"autoload-dev": {
22+
"psr-4": {
23+
"Test\\Ease\\": "vendor/vitexsoftware/ease-core/tests/src/Ease",
24+
"Test\\IPEXB2B\\": "testing/src/IPEXB2B/",
25+
"Test\\": "testing/"
26+
}
27+
},
28+
"require-dev": {
29+
"phpunit/phpunit": "*",
30+
"phpstan/phpstan": "*",
31+
"friendsofphp/php-cs-fixer": "^3.89",
32+
"ergebnis/composer-normalize": "^2.48",
33+
"ergebnis/php-cs-fixer-config": "^6.56"
34+
},
35+
"config": {
36+
"allow-plugins": {
37+
"ergebnis/composer-normalize": true
38+
}
39+
},
40+
"type": "library"
4041
}

composer.json.bak

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "spojenet/ipexb2b",
3+
"description": "PHP Based Library for easy interaction with IPEX.cz JSON api",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Vítězslav Dvořák",
8+
"email": "vitex@arachne.cz"
9+
}
10+
],
11+
"require": {
12+
"php": ">=8.0",
13+
"ext-curl": "*",
14+
"vitexsoftware/ease-core": "^1.49"
15+
},
16+
"autoload": {
17+
"psr-4": {
18+
"IPEXB2B\\": "src/IPEXB2B/"
19+
}
20+
},
21+
"autoload-dev": {
22+
"psr-4": {
23+
"Test\\Ease\\": "vendor/vitexsoftware/ease-core/tests/src/Ease",
24+
"Test\\IPEXB2B\\": "testing/src/IPEXB2B/",
25+
"Test\\": "testing/"
26+
}
27+
},
28+
"require-dev": {
29+
"phpunit/phpunit": "*",
30+
"phpstan/phpstan": "*",
31+
"friendsofphp/php-cs-fixer": "^3.89",
32+
"ergebnis/composer-normalize": "^2.48",
33+
"ergebnis/php-cs-fixer-config": "^6.56"
34+
},
35+
"config": {
36+
"allow-plugins": {
37+
"ergebnis/composer-normalize": true
38+
}
39+
}
40+
}

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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
php-spojenet-ipex-b2b (1.2.0) UNRELEASED; urgency=medium
1+
php-spojenet-ipex-b2b (1.2.0) unstable; urgency=medium
22

33
* moderinized
4+
* Modernize Debian packaging: debhelper-compat 13, pkg-php-tools, phpab
45

56
-- vitex <info@vitexsoftware.cz> Mon, 23 Dec 2024 00:00:00 +0100
67

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 & 2 deletions
This file was deleted.

debian/control

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
Source: php-spojenet-ipex-b2b
2-
Build-Depends: debhelper (>= 7.0.50~),phpdocumentor, jq, moreutils
3-
Standards-Version: 3.8.4
2+
Section: php
3+
Priority: optional
44
Maintainer: Vítězslav Dvořák <info@vitexsoftware.cz>
55
Uploaders: Vitex <vitex@hippy.cz>
6-
Priority: optional
6+
Build-Depends: debhelper-compat (= 13), pkg-php-tools (>= 1.7~), phpab, jq, moreutils
7+
Standards-Version: 4.7.0
78
Homepage: https://github.com/Spoje-NET/ipex-b2b
9+
Rules-Requires-Root: no
810

911
Package: php-spojenet-ipex-b2b
10-
Depends: ${misc:Depends}, php-curl ,php-vitexsoftware-ease-core
11-
Suggests: composer,ipex-b2b-doc
1212
Architecture: all
13-
Section: web
14-
Priority: optional
13+
Section: php
14+
Depends: ${misc:Depends}, ${phpcomposer:Debian-require}, php-curl
15+
Suggests: ipex-b2b-doc
1516
Description: PHP Based IPEX B2B RestAPI/Json library
1617
Allow you perform read and write operations on VoIP system IPEX
1718

debian/rules

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
#!/usr/bin/make -f
22

33
%:
4-
dh $@
4+
dh $@ --with phpcomposer
55

66
override_dh_auto_test:
77
echo tests temporarly skipped for now in rules file
88

99
override_dh_install:
10+
# Generate autoloader
11+
phpab --output src/IPEXB2B/autoload.php --basedir src/IPEXB2B src/IPEXB2B
1012
dh_install
11-
jq '.version = "'`dpkg-parsechangelog | sed -n 's/^Version: //p'| sed 's/~.*//'`'"' debian/composer.json |sponge debian/composer.json
12-
13-
override_dh_prep:
14-
phpdoc -d src
15-
rm -rfv docs
16-
mkdir -p docs ; mv .phpdoc/build/* docs
17-
dh_prep
13+
# Register with pkg-php-tools
14+
pkg-php-tools-phpcomposer install deb ipexb2b IPEXB2B/autoload.php
15+
# Version stamp
16+
jq '.version = "'`dpkg-parsechangelog | sed -n 's/^Version: //p'| sed 's/~.*//'`'"' debian/composer.json |sponge debian/php-spojenet-ipex-b2b/usr/share/php/IPEXB2B/composer.json

0 commit comments

Comments
 (0)