Skip to content

Commit 589965c

Browse files
committed
updated dependencies, deb and rpm packaging
1 parent a57b4b5 commit 589965c

7 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

@@ -148,10 +151,12 @@ codefix:
148151
.PHONY: deb
149152
deb:
150153
rm -rf $(PATHDEBPKG)
151-
make install DESTDIR=$(PATHDEBPKG)/$(PKGNAME)-$(VERSION)
154+
$(MAKE) install DESTDIR=$(PATHDEBPKG)/$(PKGNAME)-$(VERSION)
152155
rm -f $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/$(DOCPATH)LICENSE
153156
tar -zcvf $(PATHDEBPKG)/$(PKGNAME)_$(VERSION).orig.tar.gz -C $(PATHDEBPKG)/ $(PKGNAME)-$(VERSION)
154157
cp -rf ./resources/debian $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian
158+
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -name '*.bak' -delete
159+
chmod 755 $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/rules
155160
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed $(SEDINPLACE) "s/~#DATE#~/`date -R`/" {} \;
156161
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed $(SEDINPLACE) "s/~#VENDOR#~/$(VENDOR)/" {} \;
157162
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed $(SEDINPLACE) "s/~#PROJECT#~/$(PROJECT)/" {} \;
@@ -237,8 +242,11 @@ report: ensuretarget
237242
.PHONY: rpm
238243
rpm:
239244
rm -rf $(PATHRPMPKG)
245+
mkdir -p $(RPMDBPATH) $(PATHRPMPKG)/tmp
240246
rpmbuild \
241247
--define "_topdir $(PATHRPMPKG)" \
248+
--define "_dbpath $(RPMDBPATH)" \
249+
--define "_tmppath $(PATHRPMPKG)/tmp" \
242250
--define "_vendor $(VENDOR)" \
243251
--define "_owner $(OWNER)" \
244252
--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.6.39
1+
2.6.41

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-json, php-zip, php-tecnickcom-tc-lib-file (<< 3.0.0), php-tecnickcom-tc-lib-file (>= 2.3.7), php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.49), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.41), php-tecnickcom-tc-lib-pdf-font-core (<< 2.0.0), php-tecnickcom-tc-lib-pdf-font-data-core (>= 1.8.7), ${misc:Depends}
15+
Depends: php (>= 8.1.0), php-json, php-zip, php-tecnickcom-tc-lib-file (<< 3.0.0), php-tecnickcom-tc-lib-file (>= 2.3.9), php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.51), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.43), php-tecnickcom-tc-lib-pdf-font-core (<< 2.0.0), php-tecnickcom-tc-lib-pdf-font-data-core (>= 1.8.7), ${misc:Depends}
1416
Description: PHP PDF Fonts Library
1517
PHP library containing PDF font methods and utilities.

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: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,21 @@ Version: %{_version}
99
Release: %{_release}%{?dist}
1010
Summary: PHP PDF Fonts Library
1111

12-
Group: Development/Libraries
1312
License: LGPL-3.0+
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-json
2119
Requires: php-pcre
2220
Requires: php-zlib
2321
Requires: php-composer(%{c_vendor}/tc-lib-file) < 3.0.0
24-
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 2.3.7
22+
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 2.3.9
2523
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) < 3.0.0
26-
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.49
24+
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.51
2725
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0
28-
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.41
26+
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.43
2927
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font-data-core) < 2.0.0
3028
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font-data-core) >= 1.8.7
3129

@@ -39,18 +37,14 @@ PHP library containing PDF font methods and utilities
3937
#(cd %{_current_directory} && make build)
4038

4139
%install
42-
rm -rf $RPM_BUILD_ROOT
43-
(cd %{_current_directory} && make install DESTDIR=$RPM_BUILD_ROOT)
44-
45-
%clean
46-
rm -rf $RPM_BUILD_ROOT
47-
#(cd %{_current_directory} && make clean)
40+
rm -rf %{buildroot}
41+
(cd %{_current_directory} && make install DESTDIR=%{buildroot})
4842

4943
%files
5044
%attr(-,root,root) %{_libpath}
5145
%attr(-,root,root) %{_docpath}
5246
%docdir %{_docpath}
53-
#%config(noreplace) %{_configpath}*
47+
# Optional config files can be listed here when used by a project.
5448

5549
%changelog
5650
* Mon Aug 10 2026 Nicola Asuni <info@tecnick.com> 1.0.0-1

0 commit comments

Comments
 (0)