Skip to content

Commit dd0c656

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

9 files changed

Lines changed: 169 additions & 83 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 php-spojenet-subreg
2+
3+
## Project Overview
4+
**Type**: PHP Project/Debian Package
5+
**Purpose**: ![Php-subreg Logo](php-subreg-logo.png?raw=true "Project Logo")
6+
**Status**: Active
7+
**Repository**: git@github.com:Spoje-NET/php-subreg.git
8+
9+
## Key Technologies
10+
- PHP
11+
- Composer
12+
- Debian Packaging
13+
14+
## Architecture & Structure
15+
```
16+
php-spojenet-subreg/
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/php-subreg.git
33+
cd php-spojenet-subreg
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/subreg",
3-
"description": "PHP Based Library for easy interaction with soap.subreg.cz",
4-
"license": "MIT",
5-
"authors": [
6-
{
7-
"name": "Vítězslav Dvořák",
8-
"email": "info@vitexsoftware.cz"
9-
}
10-
],
11-
"require": {
12-
"ext-soap": "*",
13-
"vitexsoftware/ease-core": ">=1.50.1"
14-
},
15-
"autoload": {
16-
"psr-4": {
17-
"Subreg\\": "src/Subreg/"
18-
}
19-
},
20-
"autoload-dev": {
21-
"psr-4": {
22-
"Test\\Ease\\": "vendor/vitexsoftware/ease-core/tests/src/Ease",
23-
"Test\\Subreg\\": "testing/src/Subreg/",
24-
"Test\\": "testing/"
25-
}
26-
},
27-
"require-dev": {
28-
"phpunit/phpunit": "*",
29-
"phpstan/phpstan": "*",
30-
"friendsofphp/php-cs-fixer": "^3.93",
31-
"ergebnis/composer-normalize": "^2.49",
32-
"ergebnis/php-cs-fixer-config": "^6.59",
33-
"phpstan/phpstan-phpunit": "2.0.12"
34-
},
35-
"config": {
36-
"allow-plugins": {
37-
"ergebnis/composer-normalize": true
38-
}
2+
"name": "spojenet/subreg",
3+
"description": "PHP Based Library for easy interaction with soap.subreg.cz",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Vítězslav Dvořák",
8+
"email": "info@vitexsoftware.cz"
399
}
10+
],
11+
"require": {
12+
"ext-soap": "*",
13+
"vitexsoftware/ease-core": ">=1.49.0"
14+
},
15+
"autoload": {
16+
"psr-4": {
17+
"Subreg\\": "src/Subreg/"
18+
}
19+
},
20+
"autoload-dev": {
21+
"psr-4": {
22+
"Test\\Ease\\": "vendor/vitexsoftware/ease-core/tests/src/Ease",
23+
"Test\\Subreg\\": "testing/src/Subreg/",
24+
"Test\\": "testing/"
25+
}
26+
},
27+
"require-dev": {
28+
"phpunit/phpunit": "*",
29+
"phpstan/phpstan": "*",
30+
"friendsofphp/php-cs-fixer": "^3.92",
31+
"ergebnis/composer-normalize": "^2.48",
32+
"ergebnis/php-cs-fixer-config": "^6.58",
33+
"phpstan/phpstan-phpunit": "2.0.12"
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/subreg",
3+
"description": "PHP Based Library for easy interaction with soap.subreg.cz",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Vítězslav Dvořák",
8+
"email": "info@vitexsoftware.cz"
9+
}
10+
],
11+
"require": {
12+
"ext-soap": "*",
13+
"vitexsoftware/ease-core": ">=1.49.0"
14+
},
15+
"autoload": {
16+
"psr-4": {
17+
"Subreg\\": "src/Subreg/"
18+
}
19+
},
20+
"autoload-dev": {
21+
"psr-4": {
22+
"Test\\Ease\\": "vendor/vitexsoftware/ease-core/tests/src/Ease",
23+
"Test\\Subreg\\": "testing/src/Subreg/",
24+
"Test\\": "testing/"
25+
}
26+
},
27+
"require-dev": {
28+
"phpunit/phpunit": "*",
29+
"phpstan/phpstan": "*",
30+
"friendsofphp/php-cs-fixer": "^3.92",
31+
"ergebnis/composer-normalize": "^2.48",
32+
"ergebnis/php-cs-fixer-config": "^6.58",
33+
"phpstan/phpstan-phpunit": "2.0.12"
34+
},
35+
"config": {
36+
"allow-plugins": {
37+
"ergebnis/composer-normalize": true
38+
}
39+
}
40+
}

debian/changelog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
php-spojenet-subreg (1.4.0) UNRELEASED; urgency=medium
1+
php-spojenet-subreg (1.4.0) unstable; urgency=medium
22

33
* minimal supported version of php is 8.1
4+
* Modernize Debian packaging: debhelper-compat 13, pkg-php-tools, phpab
45

56
-- vitex <info@vitexsoftware.cz> Mon, 12 May 2025 12:14:10 +0200
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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Source: php-spojenet-subreg
2-
Build-Depends: debhelper (>= 7.0.50~), jq, 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: debhelper-compat (= 13), pkg-php-tools (>= 1.7~), phpab, jq, moreutils
7+
Standards-Version: 4.7.0
88
Homepage: https://github.com/Spoje-NET/php-subreg
9+
Rules-Requires-Root: no
910

1011
Package: php-spojenet-subreg
11-
Depends: ${misc:Depends}, php-vitexsoftware-ease-core, php-soap
1212
Architecture: all
13-
Section: web
14-
Priority: optional
13+
Section: php
14+
Depends: ${misc:Depends}, ${phpcomposer:Debian-require}, php-soap
1515
Description: PHP Client Library for soap.subreg.cz
1616
Provide classes for several domain/customer related operations
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,6 @@
11
#!/bin/sh
2-
# postinst script for php-spojenet-subreg
3-
#
4-
# see: dh_installdeb(1)
5-
62
set -e
73

8-
# summary of how this script can be called:
9-
# * <postinst> `configure' <most-recently-configured-version>
10-
# * <old-postinst> `abort-upgrade' <new version>
11-
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12-
# <new-version>
13-
# * <postinst> `abort-remove'
14-
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15-
# <failed-install-package> <version> `removing'
16-
# <conflicting-package> <version>
17-
# for details, see http://www.debian.org/doc/debian-policy/ or
18-
# the debian-policy package
19-
20-
21-
case "$1" in
22-
configure)
23-
24-
composer-global-update deb/subreg
25-
26-
;;
27-
28-
abort-upgrade|abort-remove|abort-deconfigure)
29-
;;
30-
31-
*)
32-
echo "postinst called with unknown argument \`$1'" >&2
33-
exit 1
34-
;;
35-
esac
36-
37-
# dh_installdeb will replace this with shell code automatically
38-
# generated by other debhelper scripts.
4+
#DEBHELPER#
395

406
exit 0

debian/rules

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +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/Subreg/autoload.php --basedir src/Subreg src/Subreg
1012
dh_install
13+
# Register with pkg-php-tools
14+
pkg-php-tools-phpcomposer install deb subreg Subreg/autoload.php
15+
# Version stamp
1116
jq '.version = "'`dpkg-parsechangelog | sed -n 's/^Version: //p'| sed 's/~.*//'`'"' debian/composer.json |sponge debian/php-spojenet-subreg/usr/share/php/Subreg/composer.json

0 commit comments

Comments
 (0)