Skip to content

Commit

Permalink
Update RPM spec file
Browse files Browse the repository at this point in the history
The RPM spec file has been updated to install/distribute
Maven artifacts in the proper locations/packages.
  • Loading branch information
edewata committed Oct 24, 2023
1 parent b5ad903 commit 86243bb
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions idm-console-framework.spec
Original file line number Diff line number Diff line change
Expand Up @@ -96,44 +96,57 @@ A Java Management Console framework used for remote server management.

%autosetup -n idm-console-framework-%{version}%{?phase:-}%{?phase} -p 1

# flatten-maven-plugin is not available in RPM
%pom_remove_plugin org.codehaus.mojo:flatten-maven-plugin

# specify Maven artifact locations
%mvn_file org.dogtagpki.ldap-sdk:ldapjdk ldapjdk/ldapjdk ldapjdk

################################################################################
%build
################################################################################

export JAVA_HOME=%{java_home}

# flatten-maven-plugin is not available in RPM
%pom_remove_plugin org.codehaus.mojo:flatten-maven-plugin

# build without Javadoc
%mvn_build -j

# specify Maven artifact locations
%mvn_file org.dogtagpki.console-framework:console-framework \
idm-console-framework/idm-console-framework \
idm-console-framework \
idm-console-base \
idm-console-mcc \
idm-console-mcc_en \
idm-console-nmclf \
idm-console-nmclf_en

################################################################################
%install
################################################################################

%mvn_install

install -p target/idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-framework.jar
#install -p target/idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-framework.jar

# create links for backward compatibility
ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-base.jar
ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-mcc.jar
ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-mcc_en.jar
ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-nmclf.jar
ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-nmclf_en.jar
#ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-base.jar
#ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-mcc.jar
#ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-mcc_en.jar
#ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-nmclf.jar
#ln -s idm-console-framework.jar %{buildroot}%{_javadir}/idm-console-nmclf_en.jar

################################################################################
%files -n %{product_id} -f .mfiles
################################################################################

%doc LICENSE
%{_javadir}/idm-console-framework.jar
%{_javadir}/idm-console-base.jar
%{_javadir}/idm-console-mcc.jar
%{_javadir}/idm-console-mcc_en.jar
%{_javadir}/idm-console-nmclf.jar
%{_javadir}/idm-console-nmclf_en.jar
#{_javadir}/idm-console-framework.jar
#{_javadir}/idm-console-base.jar
#{_javadir}/idm-console-mcc.jar
#{_javadir}/idm-console-mcc_en.jar
#{_javadir}/idm-console-nmclf.jar
#{_javadir}/idm-console-nmclf_en.jar

################################################################################
%changelog
Expand Down

0 comments on commit 86243bb

Please sign in to comment.