Skip to content

Commit 42febdf

Browse files
committed
Update dependencies and Makefile menu
1 parent b986436 commit 42febdf

5 files changed

Lines changed: 27 additions & 41 deletions

File tree

Makefile

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -101,56 +101,43 @@ help:
101101
@echo "$(PROJECT) Makefile."
102102
@echo "The following commands are available:"
103103
@echo ""
104-
@echo " make buildall : Build and test everything from scratch"
105-
@echo " make bz2 : Package the library in a compressed bz2 archive"
106-
@echo " make clean : Delete the vendor and target directories"
107-
@echo " make codefix : Fix code style violations"
108-
@echo " make deb : Build a DEB package for Debian-like Linux distributions"
109-
@echo " make deps : Download all dependencies"
110-
@echo " make doc : Generate source code documentation"
111-
@echo " make lint : Test source code for coding standard violations"
112-
@echo " make qa : Run all tests and reports"
113-
@echo " make report : Generate various reports"
114-
@echo " make rpm : Build an RPM package for RedHat-like Linux distributions"
115-
@echo " make server : Start the development server"
116-
@echo " make test : Run unit tests"
117-
@echo " make versionup: Increase the version patch number"
104+
@awk '/^## /{desc=substr($$0,4)} /^\.PHONY:/{if(NF>1) {target=$$2; if(desc) printf " make %-15s: %s\n",target,desc; desc=""}}' Makefile
118105
@echo ""
119-
@echo "To test and build everything from scratch:"
120-
@echo "make buildall"
106+
@echo "To test and build everything from scratch, use the shortcut:"
107+
@echo " make x"
121108
@echo ""
122109

123110
# alias for help target
124111
.PHONY: all
125112
all: help
126113

127-
# Full build and test sequence
114+
## Full build and test sequence
128115
.PHONY: x
129116
x: buildall
130117

131-
# Full build and test sequence
118+
## Full build and test sequence
132119
.PHONY: buildall
133120
buildall: deps codefix qa bz2 rpm deb
134121

135-
# Package the library in a compressed bz2 archive
122+
## Package the library in a compressed bz2 archive
136123
.PHONY: bz2
137124
bz2:
138125
rm -rf $(PATHBZ2PKG)
139126
make install DESTDIR=$(PATHBZ2PKG)
140127
tar -jcvf $(PATHBZ2PKG)/$(PKGNAME)-$(VERSION)-$(RELEASE).tbz2 -C $(PATHBZ2PKG) $(DATADIR)
141128

142-
# Delete the vendor and target directories
129+
## Delete the vendor and target directories
143130
.PHONY: clean
144131
clean:
145132
rm -rf ./vendor $(TARGETDIR)
146133

147-
# Fix code style violations
134+
## Fix code style violations
148135
.PHONY: codefix
149136
codefix:
150137
./vendor/bin/phpcbf --config-set ignore_non_auto_fixable_on_exit 1
151138
./vendor/bin/phpcbf --ignore="\./vendor/" --standard=psr12 src test
152139

153-
# Build a DEB package for Debian-like Linux distributions
140+
## Build a DEB package for Debian-like Linux distributions
154141
.PHONY: deb
155142
deb:
156143
rm -rf $(PATHDEBPKG)
@@ -175,28 +162,28 @@ endif
175162
echo "new-package-should-close-itp-bug" > $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/$(PKGNAME).lintian-overrides
176163
cd $(PATHDEBPKG)/$(PKGNAME)-$(VERSION) && debuild -us -uc
177164

178-
# Clean all artifacts and download all dependencies
165+
## Clean all artifacts and download all dependencies
179166
.PHONY: deps
180167
deps: ensuretarget
181168
rm -rf ./vendor/*
182169
($(COMPOSER) install -vvv --no-interaction)
183170
curl --silent --show-error --fail --location --output ./vendor/phpstan.phar https://github.com/phpstan/phpstan/releases/download/${PHPSTANVER}/phpstan.phar \
184171
&& chmod +x ./vendor/phpstan.phar
185172

186-
# Generate source code documentation
173+
## Generate source code documentation
187174
.PHONY: doc
188175
doc: ensuretarget
189176
rm -rf $(TARGETDIR)/doc
190177
$(PHPDOC) -d ./src -t $(TARGETDIR)/doc/
191178

192-
# Create missing target directories for test and build artifacts
179+
## Create missing target directories for test and build artifacts
193180
.PHONY: ensuretarget
194181
ensuretarget:
195182
mkdir -p $(TARGETDIR)/test
196183
mkdir -p $(TARGETDIR)/report
197184
mkdir -p $(TARGETDIR)/doc
198185

199-
# Install this application
186+
## Install this application
200187
.PHONY: install
201188
install: uninstall
202189
mkdir -p $(PATHINSTBIN)
@@ -218,25 +205,25 @@ ifneq ($(strip $(CONFIGPATH)),)
218205
find $(PATHINSTCFG) -type f -exec chmod 644 {} \;
219206
endif
220207

221-
# Test source code for coding standard violations
208+
## Test source code for coding standard violations
222209
.PHONY: lint
223210
lint:
224211
./vendor/bin/phpcs --standard=phpcs.xml
225212
./vendor/bin/phpmd src text codesize,unusedcode,naming,design --exclude */vendor/*
226213
./vendor/bin/phpmd test text unusedcode,naming,design --exclude */vendor/*
227214
php -r 'exit((int)version_compare(PHP_MAJOR_VERSION, "7", ">"));' || ./vendor/phpstan.phar analyse
228215

229-
# Run all tests and reports
216+
## Run all tests and reports
230217
.PHONY: qa
231218
qa: ensuretarget lint test report
232219

233-
# Generate various reports
220+
## Generate various reports
234221
.PHONY: report
235222
report: ensuretarget
236223
./vendor/bin/pdepend --jdepend-xml=$(TARGETDIR)/report/dependencies.xml --summary-xml=$(TARGETDIR)/report/metrics.xml --jdepend-chart=$(TARGETDIR)/report/dependecies.svg --overview-pyramid=$(TARGETDIR)/report/overview-pyramid.svg --ignore=vendor ./src
237224
#./vendor/bartlett/php-compatinfo/bin/phpcompatinfo --no-ansi analyser:run src/ > $(TARGETDIR)/report/phpcompatinfo.txt
238225

239-
# Build the RPM package for RedHat-like Linux distributions
226+
## Build the RPM package for RedHat-like Linux distributions
240227
.PHONY: rpm
241228
rpm:
242229
rm -rf $(PATHRPMPKG)
@@ -254,34 +241,33 @@ rpm:
254241
--define "_configpath /$(CONFIGPATH)" \
255242
-bb resources/rpm/rpm.spec
256243

257-
# Start the development server
244+
## Start the development server
258245
.PHONY: server
259246
server:
260247
$(PHP) -t example -S localhost:$(PORT)
261248

262-
# Tag this GIT version
249+
## Tag this GIT version
263250
.PHONY: tag
264251
tag:
265252
git checkout main && \
266253
git tag -a ${VERSION} -m "Release ${VERSION}" && \
267254
git push origin --tags && \
268255
git pull
269256

270-
# Run unit tests
257+
## Run unit tests
271258
.PHONY: test
272259
test:
273260
cp phpunit.xml.dist phpunit.xml
274261
#./vendor/bin/phpunit --migrate-configuration || true
275262
XDEBUG_MODE=coverage ./vendor/bin/phpunit --stderr test
276263

277-
# Remove all installed files
264+
## Remove all installed files
278265
.PHONY: uninstall
279266
uninstall:
280267
rm -rf $(PATHINSTBIN)
281268
rm -rf $(PATHINSTDOC)
282269

283-
# Increase the version patch number
270+
## Increase the version patch number
284271
.PHONY: versionup
285272
versionup:
286273
echo ${VERSION} | gawk -F. '{printf("%d.%d.%d\n",$$1,$$2,(($$3+1)));}' > VERSION
287-

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.13
1+
2.4.14

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"require-dev": {
3333
"pdepend/pdepend": "2.16.2",
3434
"phpmd/phpmd": "2.15.0",
35-
"phpunit/phpunit": "13.0.5 || 12.5.14 || 11.5.55 || 10.5.63",
35+
"phpunit/phpunit": "13.1.1 || 12.5.17 || 11.5.55 || 10.5.63",
3636
"squizlabs/php_codesniffer": "4.0.1",
3737
"phpcompatibility/php-compatibility": "^10.0.0@dev"
3838
},

resources/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Vcs-Git: https://github.com/~#VENDOR#~/~#PROJECT#~.git
1010
Package: ~#PKGNAME#~
1111
Provides: php-~#PROJECT#~
1212
Architecture: all
13-
Depends: php (>= 8.1.0), php-zip, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.3.10), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.36), ${misc:Depends}
13+
Depends: php (>= 8.1.0), php-zip, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.3.11), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.37), ${misc:Depends}
1414
Description: PHP PDF Graph Library
1515
PHP library containing PDF graphic and geometric methods.

resources/rpm/rpm.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ BuildArch: noarch
1919
Requires: php(language) >= 8.1.0
2020
Requires: php-zlib
2121
Requires: php-composer(%{c_vendor}/tc-lib-color) < 3.0.0
22-
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.3.10
22+
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.3.11
2323
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0
24-
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.36
24+
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.37
2525

2626
Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version}
2727
Provides: php-%{gh_project} = %{version}

0 commit comments

Comments
 (0)