Skip to content

Commit 1770eec

Browse files
committed
updated dependencies, deb and rpm packaging
1 parent 4057b35 commit 1770eec

8 files changed

Lines changed: 25 additions & 18 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.34
1+
2.4.36

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"ext-date": "*",
6161
"ext-gd": "*",
6262
"ext-pcre": "*",
63-
"tecnickcom/tc-lib-color": "^2.3"
63+
"tecnickcom/tc-lib-color": "^2.4"
6464
},
6565
"minimum-stability": "dev",
6666
"prefer-stable": true,

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,15 +2,17 @@ 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-bcmath, php-date, php-gd, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.3.14), ${misc:Depends}
15+
Depends: php (>= 8.1.0), php-bcmath, php-date, php-gd, php-tecnickcom-tc-lib-color (<< 3.0.0), php-tecnickcom-tc-lib-color (>= 2.4.1), ${misc:Depends}
1416
Description: PHP Barcode library
1517
This library includes PHP classes to generate linear
1618
and bidimensional barcodes:

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: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@ Version: %{_version}
99
Release: %{_release}%{?dist}
1010
Summary: PHP library to generate linear and bidimensional barcodes
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-composer(%{c_vendor}/tc-lib-color) < 3.0.0
21-
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.3.14
19+
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.4.1
2220
Requires: php-bcmath
2321
Requires: php-date
2422
Requires: php-gd
@@ -43,18 +41,14 @@ Optional dependency: php-pecl-imagick
4341
#(cd %{_current_directory} && make build)
4442

4543
%install
46-
rm -rf $RPM_BUILD_ROOT
47-
(cd %{_current_directory} && make install DESTDIR=$RPM_BUILD_ROOT)
48-
49-
%clean
50-
rm -rf $RPM_BUILD_ROOT
51-
#(cd %{_current_directory} && make clean)
44+
rm -rf %{buildroot}
45+
(cd %{_current_directory} && make install DESTDIR=%{buildroot})
5246

5347
%files
5448
%attr(-,root,root) %{_libpath}
5549
%attr(-,root,root) %{_docpath}
5650
%docdir %{_docpath}
57-
#%config(noreplace) %{_configpath}*
51+
# Optional config files can be listed here when used by a project.
5852

5953
%changelog
6054
* Thu Jul 02 2026 Nicola Asuni <info@tecnick.com> 1.2.0-1

0 commit comments

Comments
 (0)