Skip to content

Commit 5581dc9

Browse files
committed
updated dependencies, deb and rpm packaging
1 parent 3646f1a commit 5581dc9

8 files changed

Lines changed: 26 additions & 19 deletions

File tree

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ TARGETDIR=$(CURRENTDIR)target
6565
# RPM Packaging path (where RPMs will be stored)
6666
PATHRPMPKG=$(TARGETDIR)/RPM
6767

68+
# RPM local database path (avoid host rpmdb permission issues)
69+
RPMDBPATH=$(PATHRPMPKG)/.rpmdb
70+
6871
# DEB Packaging path (where DEBs will be stored)
6972
PATHDEBPKG=$(TARGETDIR)/DEB
7073

@@ -141,10 +144,12 @@ codefix:
141144
.PHONY: deb
142145
deb:
143146
rm -rf $(PATHDEBPKG)
144-
make install DESTDIR=$(PATHDEBPKG)/$(PKGNAME)-$(VERSION)
147+
$(MAKE) install DESTDIR=$(PATHDEBPKG)/$(PKGNAME)-$(VERSION)
145148
rm -f $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/$(DOCPATH)LICENSE
146149
tar -zcvf $(PATHDEBPKG)/$(PKGNAME)_$(VERSION).orig.tar.gz -C $(PATHDEBPKG)/ $(PKGNAME)-$(VERSION)
147150
cp -rf ./resources/debian $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian
151+
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -name '*.bak' -delete
152+
chmod 755 $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/rules
148153
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed $(SEDINPLACE) "s/~#DATE#~/`date -R`/" {} \;
149154
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed $(SEDINPLACE) "s/~#VENDOR#~/$(VENDOR)/" {} \;
150155
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed $(SEDINPLACE) "s/~#PROJECT#~/$(PROJECT)/" {} \;
@@ -227,8 +232,11 @@ report: ensuretarget
227232
.PHONY: rpm
228233
rpm:
229234
rm -rf $(PATHRPMPKG)
235+
mkdir -p $(RPMDBPATH) $(PATHRPMPKG)/tmp
230236
rpmbuild \
231237
--define "_topdir $(PATHRPMPKG)" \
238+
--define "_dbpath $(RPMDBPATH)" \
239+
--define "_tmppath $(PATHRPMPKG)/tmp" \
232240
--define "_vendor $(VENDOR)" \
233241
--define "_owner $(OWNER)" \
234242
--define "_project $(PROJECT)" \

RELEASE

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

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.18
1+
2.4.20

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"require": {
2222
"php": ">=8.1",
2323
"ext-zlib": "*",
24-
"tecnickcom/tc-lib-color": "^2.3",
24+
"tecnickcom/tc-lib-color": "^2.4",
2525
"tecnickcom/tc-lib-pdf-encrypt": "^2.1"
2626
},
2727
"minimum-stability": "dev",

resources/debian/compat

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

resources/debian/control

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ Source: ~#PKGNAME#~
22
Maintainer: Nicola Asuni <info@tecnick.com>
33
Section: php
44
Priority: optional
5-
Build-Depends: debhelper (>= 9)
6-
Standards-Version: 3.9.7
5+
Build-Depends: debhelper-compat (= 13)
6+
Standards-Version: 4.7.2
7+
Rules-Requires-Root: no
78
Homepage: https://github.com/~#VENDOR#~/~#PROJECT#~
89
Vcs-Git: https://github.com/~#VENDOR#~/~#PROJECT#~.git
10+
Vcs-Browser: https://github.com/~#VENDOR#~/~#PROJECT#~
911

1012
Package: ~#PKGNAME#~
1113
Provides: php-~#PROJECT#~
1214
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.14), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.41), ${misc:Depends}
15+
Depends: php (>= 8.1.0), php-zip, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.4.1), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.43), ${misc:Depends}
1416
Description: PHP PDF Graph Library
1517
PHP library containing PDF graphic and geometric methods.

resources/debian/watch

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version=4
2+
opts=filenamemangle=s/.+\/v?(\d[\d\.]+)\.tar\.gz/~#PKGNAME#~_$1.orig.tar.gz/ \
3+
https://github.com/~#VENDOR#~/~#PROJECT#~/tags \
4+
.*/archive/refs/tags/v?(\d[\d\.]*)\.tar\.gz

resources/rpm/rpm.spec

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,17 @@ Version: %{_version}
99
Release: %{_release}%{?dist}
1010
Summary: PHP library containing PDF graphic and geometric methods
1111

12-
Group: Development/Libraries
1312
License: LGPLv3+
1413
URL: https://github.com/%{gh_owner}/%{gh_project}
1514

16-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
1715
BuildArch: noarch
1816

1917
Requires: php(language) >= 8.1.0
2018
Requires: php-zlib
2119
Requires: php-composer(%{c_vendor}/tc-lib-color) < 3.0.0
22-
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.3.14
20+
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.4.1
2321
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0
24-
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.41
22+
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.43
2523

2624
Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version}
2725
Provides: php-%{gh_project} = %{version}
@@ -33,18 +31,14 @@ PHP library containing PDF graphic and geometric methods
3331
#(cd %{_current_directory} && make build)
3432

3533
%install
36-
rm -rf $RPM_BUILD_ROOT
37-
(cd %{_current_directory} && make install DESTDIR=$RPM_BUILD_ROOT)
38-
39-
%clean
40-
rm -rf $RPM_BUILD_ROOT
41-
#(cd %{_current_directory} && make clean)
34+
rm -rf %{buildroot}
35+
(cd %{_current_directory} && make install DESTDIR=%{buildroot})
4236

4337
%files
4438
%attr(-,root,root) %{_libpath}
4539
%attr(-,root,root) %{_docpath}
4640
%docdir %{_docpath}
47-
#%config(noreplace) %{_configpath}*
41+
# Optional config files can be listed here when used by a project.
4842

4943
%changelog
5044
* Mon Dec 14 2026 Nicola Asuni <info@tecnick.com> 1.0.0-1

0 commit comments

Comments
 (0)