Skip to content

Commit 493390c

Browse files
committed
Use jpackage_script without workarounds
- Fix comments - Add base alternative name - Add .gitignore - Add PoDoFo LGPL-2.0 license to the 'License' field Signed-off-by: Luca Magrone <luca@magrone.cc>
1 parent a5af227 commit 493390c

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.rpm*
2+
*.tar.gz*

cie-middleware.spec

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Name: cie-middleware
22
Version: 1.4.3.9
33
Release: %autorelease
44
Summary: Middleware for CIE (Italian Electronic ID Card)
5-
License: BSD 3-Clause
5+
License: (BSD-3-Clause AND LGPL-2.0)
66
URL: https://github.com/italia/cie-middleware-linux
77

88
ExclusiveArch: %{java_arches}
@@ -54,7 +54,7 @@ BuildRequires: mvn(ch.swingfx:twinkle)
5454

5555
Requires: xmvn-tools
5656

57-
# Bundle PoDoFo to avoid fixing code where the available version is 10+
57+
# Bundle PoDoFo to avoid maintaining fixes for multiple versions
5858
# License: LGPL 2.0
5959
Provides: bundled(podofo) = 0.9.6
6060

@@ -111,7 +111,7 @@ install %{SOURCE5} pom.xml
111111
rm -rf CIEID/lib
112112

113113
# Set alternative names
114-
%mvn_file :cieid cieid/cieid
114+
%mvn_file :cieid cieid/cieid cieid
115115

116116
%build
117117
# Build and fake-install PoDoFo
@@ -141,19 +141,18 @@ DESTDIR=./podofo_lib %__cmake --install podofo_build
141141
%mvn_build
142142

143143
%install
144+
# Install library
144145
%cmake_install
145146

147+
# Install CIEID
146148
%mvn_install
147149

148-
# Generate wrapper script
149-
%jpackage_script it.ipzs.cieid.MainApplication "" OPTS CPATH cieid true
150-
151-
# Workaround to avoid spaces from messing up
152-
sed -i 's/OPTS/\"-Xms1G -Xmx1G -Dawt.useSystemAAFontSettings=on\"/' %{buildroot}%{_bindir}/cieid
153-
154-
# Workaround to provide classpaths with groupId:artifactId
155-
sed -i 's/CPATH/it.ipzs:cieid com.google.code.gson:gson net.java.dev.jna:jna org.ghost4j:ghost4j ch.swingfx:twinkle apache-commons-io openpdf slf4j/' %{buildroot}%{_bindir}/cieid
150+
# Generate wrapper script for CIEID
151+
%global jopts -Xms1G -Xmx1G -Dawt.useSystemAAFontSettings=on
152+
%global cpaths cieid:google-gson:jna:ghost4j:swingfx-twinkle:apache-commons-io:openpdf:slf4j
153+
%jpackage_script it.ipzs.cieid.MainApplication "" "%{?quote:%jopts}" %cpaths cieid true
156154

155+
# Install desktop configuration
157156
mkdir -p %{buildroot}%{_datadir}/pixmaps
158157
install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/cieid.png
159158

0 commit comments

Comments
 (0)