Skip to content

Commit a46b64f

Browse files
committed
updated dependencies, deb and rpm packaging
1 parent 77dc342 commit a46b64f

7 files changed

Lines changed: 22 additions & 15 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

@@ -140,10 +143,12 @@ codefix:
140143
.PHONY: deb
141144
deb:
142145
rm -rf $(PATHDEBPKG)
143-
make install DESTDIR=$(PATHDEBPKG)/$(PKGNAME)-$(VERSION)
146+
$(MAKE) install DESTDIR=$(PATHDEBPKG)/$(PKGNAME)-$(VERSION)
144147
rm -f $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/$(DOCPATH)LICENSE
145148
tar -zcvf $(PATHDEBPKG)/$(PKGNAME)_$(VERSION).orig.tar.gz -C $(PATHDEBPKG)/ $(PKGNAME)-$(VERSION)
146149
cp -rf ./resources/debian $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian
150+
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -name '*.bak' -delete
151+
chmod 755 $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/rules
147152
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed $(SEDINPLACE) "s/~#DATE#~/`date -R`/" {} \;
148153
find $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/ -type f -exec sed $(SEDINPLACE) "s/~#VENDOR#~/$(VENDOR)/" {} \;
149154
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.0.49
1+
2.0.51

resources/debian/compat

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

resources/debian/control

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ 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#~

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: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ Version: %{_version}
99
Release: %{_release}%{?dist}
1010
Summary: PHP library containing Unicode definitions
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
@@ -28,18 +26,14 @@ PHP library containing Unicode definitions
2826
#(cd %{_current_directory} && make build)
2927

3028
%install
31-
rm -rf $RPM_BUILD_ROOT
32-
(cd %{_current_directory} && make install DESTDIR=$RPM_BUILD_ROOT)
33-
34-
%clean
35-
rm -rf $RPM_BUILD_ROOT
36-
#(cd %{_current_directory} && make clean)
29+
rm -rf %{buildroot}
30+
(cd %{_current_directory} && make install DESTDIR=%{buildroot})
3731

3832
%files
3933
%attr(-,root,root) %{_libpath}
4034
%attr(-,root,root) %{_docpath}
4135
%docdir %{_docpath}
42-
#%config(noreplace) %{_configpath}*
36+
# Optional config files can be listed here when used by a project.
4337

4438
%changelog
4539
* Thu Jul 02 2026 Nicola Asuni <info@tecnick.com> 1.1.0-1

0 commit comments

Comments
 (0)