Skip to content

Commit

Permalink
Split filesystem macros to separate macro file
Browse files Browse the repository at this point in the history
Closes: #57
  • Loading branch information
mizdebsk committed Jun 5, 2018
1 parent 54b1eef commit 25fc937
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 79 deletions.
15 changes: 11 additions & 4 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ dir "${datadir}/eclipse"
dir "${datadir}/eclipse/dropins"
dir "${datadir}/eclipse/droplets"

if [[ -z "${scl}" ]]; then
# in scl, macros.javapackages-filesystem is installed in javapackages-local
inst_data macros.d/macros.javapackages-filesystem "${rpmmacrodir}"
fi


exec >files-tools

Expand Down Expand Up @@ -180,10 +185,12 @@ inst_data java-utils/mvn_file.py "${javadir}-utils"
inst_data java-utils/mvn_package.py "${javadir}-utils"

if [[ -n "${scl}" ]]; then
# Base RHEL contains macros in /etc/ that would override ours.
# We need to place ours there alphabetically after to prevent that.
# Additionally we move macros.jpackage to javapackages-local, so they don't
# interfere with base RHEL if only javapackages-tools is installed.
# Base RHEL contains macros in /etc/ that would override ours. We need to
# place ours there alphabetically after to prevent that. Additionally we
# move macros.{jpackage,javapackages-filesystem} to javapackages-local, so
# they don't interfere with base RHEL if only javapackages-tools is
# installed.
inst_data macros.d/macros.javapackages-filesystem "${rpmmacrodir}" "macros.x-${scl}.javapackages-filesystem"
inst_data target/macros.fjava "${rpmmacrodir}" "macros.x-${scl}.fjava"
inst_data target/macros.jpackage "${rpmmacrodir}" "macros.x-${scl}.jpackage"
inst_data target/macros.scl-java-template "${rpmmacrodir}" "macros.${scl}.scl-java-template"
Expand Down
82 changes: 82 additions & 0 deletions macros.d/macros.javapackages-filesystem
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#
# RPM macros for Java filesystem layout.
#
# JPackage Project <http://www.jpackage.org/>
# David Walluck <david@jpackage.org>
# Ville Skyttä <scop at jpackage.org>
# Nicolas Mailhot <Nicolas.Mailhot@laPoste.net>
#

#==============================================================================
# ---- default Java directories

#
# Root directory where all Java VMs/SDK/JREs are installed.
#
%_jvmdir %{_prefix}/lib/jvm

#
# Root directory for all Java VM/SDK/JRE's private things.
#
%_jvmprivdir %{_prefix}/lib/jvm-private

#
# Root directory for all architecture dependent parts of Java VM/SDK/JRE's
#
%_jvmlibdir %{_prefix}/lib/jvm

#
# Root directory for all architecture independent parts of Java VM/SDK/JRE's
#
%_jvmdatadir %{_datadir}/jvm

#
# Root directory for all configurations parts of Java VM/SDK/JRE's
#
%_jvmsysconfdir %{_sysconfdir}/jvm

#
# Root directory for all common architecture dependent parts of Java VM/SDK/JRE's
#
%_jvmcommonlibdir %{_prefix}/lib/jvm-commmon

#
# Root directory for all common architecture independent parts of Java VM/SDK/JRE's
#
%_jvmcommondatadir %{_datadir}/jvm-commmon

#
# Root directory for all common configurations parts of Java VM/SDK/JRE's
#
%_jvmcommonsysconfdir %{_sysconfdir}/jvm-commmon

#
# Directory containing Java configuration file (java.conf)
#
%_javaconfdir %{_sysconfdir}/java

#
# Directory where arch and version independent jars are installed.
# This has already been integrated in RH macros following our request.
#
%_javadir %{_datadir}/java

#
# Directory where arch-specific (JNI) version-independent jars are installed.
#
%_jnidir %{_prefix}/lib/java

#
# Root directory where all javadoc is installed. Also already in RH macros.
#
%_javadocdir %{_datadir}/javadoc

#
# Directory for Maven POM files
#
%_mavenpomdir %{_datadir}/maven-poms

#
# Directory for Ivy XML files
#
%_ivyxmldir %{_datadir}/ivy-xmls
75 changes: 0 additions & 75 deletions macros.d/macros.jpackage
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,6 @@
# Nicolas Mailhot <Nicolas.Mailhot@laPoste.net>
#

#==============================================================================
# ---- default Java directories

#
# Root directory where all Java VMs/SDK/JREs are installed.
#
%_jvmdir %{_prefix}/lib/jvm

#
# Root directory for all Java VM/SDK/JRE's private things.
#
%_jvmprivdir %{_prefix}/lib/jvm-private

#
# Root directory for all architecture dependent parts of Java VM/SDK/JRE's
#
%_jvmlibdir %{_prefix}/lib/jvm

#
# Root directory for all architecture independent parts of Java VM/SDK/JRE's
#
%_jvmdatadir %{_datadir}/jvm

#
# Root directory for all configurations parts of Java VM/SDK/JRE's
#
%_jvmsysconfdir %{_sysconfdir}/jvm

#
# Root directory for all common architecture dependent parts of Java VM/SDK/JRE's
#
%_jvmcommonlibdir %{_prefix}/lib/jvm-commmon

#
# Root directory for all common architecture independent parts of Java VM/SDK/JRE's
#
%_jvmcommondatadir %{_datadir}/jvm-commmon

#
# Root directory for all common configurations parts of Java VM/SDK/JRE's
#
%_jvmcommonsysconfdir %{_sysconfdir}/jvm-commmon

#
# Directory containing Java configuration file (java.conf)
#
%_javaconfdir %{_sysconfdir}/java

#
# Directory where arch and version independent jars are installed.
# This has already been integrated in RH macros following our request.
#
%_javadir %{_datadir}/java

#
# Directory where arch-specific (JNI) version-independent jars are installed.
#
%_jnidir %{_prefix}/lib/java

#
# Root directory where all javadoc is installed. Also already in RH macros.
#
%_javadocdir %{_datadir}/javadoc

#
# Directory for Maven POM files
#
%_mavenpomdir %{_datadir}/maven-poms

#
# Directory for Ivy XML files
#
%_ivyxmldir %{_datadir}/ivy-xmls


#
# Current default JVM home.
#
Expand Down

0 comments on commit 25fc937

Please sign in to comment.