Skip to content

Commit 36adf14

Browse files
committed
updated dependencies, deb and rpm packaging
1 parent c420ca2 commit 36adf14

7 files changed

Lines changed: 24 additions & 17 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.50
1+
2.0.52

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-mbstring, php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.49), ${misc:Depends}
15+
Depends: php (>= 8.1.0), php-mbstring, php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.51), ${misc:Depends}
1416
Description: PHP Unicode methods.
1517
PHP library containing Unicode 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: 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 containing Unicode 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-composer(%{c_vendor}/tc-lib-unicode-data) < 3.0.0
21-
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.49
19+
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.51
2220
Requires: php-pcre
2321
Requires: php-mbstring
2422

@@ -32,18 +30,14 @@ PHP library containing Unicode methods
3230
#(cd %{_current_directory} && make build)
3331

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

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

4842
%changelog
4943
* Tue Jul 21 2026 Nicola Asuni <info@tecnick.com> 1.0.0-1

0 commit comments

Comments
 (0)