diff --git a/macros.hpc b/macros.hpc index ca8fa70..cf40db6 100644 --- a/macros.hpc +++ b/macros.hpc @@ -32,9 +32,12 @@ %hpc_libexecdir %{hpc_prefix}/lib %hpc_localstatedir %{_localstatedir} %hpc_sharedstatedir %{_sharedstatedir} -%hpc_mandir %{hpc_prefix}/share/man -%hpc_infodir %{hpc_prefix}/share/info +%hpc_mandir %{hpc_datadir}/man +%hpc_docdir %{hpc_datadir}/doc/packages +%hpc_infodir %{hpc_datadir}/info %hpc_pkgconfigdir %{hpc_libdir}/pkgconfig +%hpc_cmake_dir %{hpc_datadir}/cmake +%hpc_cmake_moddir %{hpc_cmake_dir}/Modules # pkgconfig # %hpc_write_pkgconfig [-l ][-n ] @@ -294,7 +297,7 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version} --exec-prefix=%{hpc_exec_prefix} \\\ --bindir=%{hpc_bindir} \\\ --sbindir=%{hpc_sbindir} \\\ - --sysconfdir=%{_sysconfdir} \\\ + --sysconfdir=%{hpc_sysconfdir} \\\ --datadir=%{hpc_datadir} \\\ --includedir=%{hpc_includedir} \\\ --libdir=%{hpc_libdir} \\\ @@ -637,7 +640,7 @@ sys.exit(0)" %{1} %hpc_compress_man() \ [ -n "%{*}" ] || { echo "no man page list!" >&2 ; exit 1; } \ for j in %{*}; do \ - for i in $(ls %{buildroot}%hpc_mandir/man${j}/*.${j}* | grep -v ".*\.gz$"); \ + for i in $(ls %{buildroot}%{hpc_mandir}/man${j}/*.${j}* | grep -v ".*\.gz$"); \ do \ test -L $i && continue \ gzip $i \ @@ -646,17 +649,66 @@ sys.exit(0)" %{1} # wraps macro from macros.cmake - paths replaced by HPC paths. %hpc_cmake \ - %{!?cmake:%{error: please include macros.cmake}} \ - %{?cmake: \ + %{!?cmake:%{error: please include macros.cmake}} \ + %{?cmake: \ %global __cmake %{_bindir}/cmake \ - %define _prefix %{hpc_prefix} \ - %define _includedir %{hpc_includedir} \ - %define _libdir %{hpc_libdir} \ + %define _bindir %{hpc_bindir} \ %define _datadir %{hpc_datadir} \ + %define _includedir %{hpc_includedir} \ + %define _infodir %{hpc_infodir} \ + %define _libdir %{hpc_libdir} \ + %define _libexecdir %{hpc_libexecdir} \ + %define _localstatedir %{hpc_localstatedir} \ + %define _mandir %{hpc_mandir} \ + %define _prefix %{hpc_prefix} \ + %define _sbindir %{hpc_sbindir} \ + %define _sharedstatedir %{hpc_sharedstatedir} \ + %define _sysconfdir %{hpc_sysconfdir} \ %cmake \\\ %undefine __cmake \\\ - %undefine _prefix \\\ - %undefine _includedir \\\ - %undefine _libdir \\\ + %undefine _bindir \\\ %undefine _datadir \\\ + %undefine _includedir \\\ + %undefine _infodir \\\ + %undefine _libdir \\\ + %undefine _libexecdir \\\ + %undefine _localstatedir \\\ + %undefine _mandir \\\ + %undefine _prefix \\\ + %undefine _sbindir \\\ + %undefine _sharedstatedir \\\ + %undefine _sysconfdir \\\ + } + +# wraps macro from macros.meson - paths replaced by HPC paths. +%hpc_meson \ + %{!?meson:%{error: please include macros.meson}} \ + %{?meson: \ + %global __meson %{_bindir}/meson \ + %define _bindir %{hpc_bindir} \ + %define _datadir %{hpc_datadir} \ + %define _includedir %{hpc_includedir} \ + %define _infodir %{hpc_infodir} \ + %define _libdir %{hpc_libdir} \ + %define _libexecdir %{hpc_libexecdir} \ + %define _localstatedir %{hpc_localstatedir} \ + %define _mandir %{hpc_mandir} \ + %define _prefix %{hpc_prefix} \ + %define _sbindir %{hpc_sbindir} \ + %define _sharedstatedir %{hpc_sharedstatedir} \ + %define _sysconfdir %{hpc_sysconfdir} \ + %meson \\\ + %undefine __meson \\\ + %undefine _bindir \\\ + %undefine _datadir \\\ + %undefine _includedir \\\ + %undefine _infodir \\\ + %undefine _libdir \\\ + %undefine _libexecdir \\\ + %undefine _localstatedir \\\ + %undefine _mandir \\\ + %undefine _prefix \\\ + %undefine _sbindir \\\ + %undefine _sharedstatedir \\\ + %undefine _sysconfdir \\\ } diff --git a/suse-hpc.changes b/suse-hpc.changes index a518f7d..526da59 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Dec 14 19:20:06 UTC 2018 - Todd R + +- Add hpc_docdir macro. +- Add cmake directories macros. +- Use upstream-recommended %{_rpmconfigdir}/macros.d directory + for rpm macros. +- Add meson macro. +- Future-proof cmake macro. + ------------------------------------------------------------------- Mon Nov 19 01:19:05 UTC 2018 - eich@suse.com diff --git a/suse-hpc.spec b/suse-hpc.spec index daedcbc..a27141e 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -29,7 +29,6 @@ Source3: hpc_elf.attr Source4: hpc_elflib.attr Source5: LICENSE Url: http://www.suse.com/hpc -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Provide rpm macros for building and installing SUSE HPC @@ -42,8 +41,8 @@ cp %{S:1} . gcc -o dlinfo dlinfo.c -ldl %install -mkdir -p %{buildroot}%{_sysconfdir}/rpm -install -m 644 %{S:0} %{buildroot}%{_sysconfdir}/rpm +mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d +install -m 644 %{S:0} %{buildroot}%{_rpmconfigdir}/macros.d mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs install -m 755 %{S:2} dlinfo %{buildroot}%{_rpmconfigdir} install -m 644 %{S:3} %{S:4} %{buildroot}%{_rpmconfigdir}/fileattrs @@ -56,9 +55,8 @@ cp %{S:5} . %endif %files -%defattr(-,root,root,-) %mylicense LICENSE -%config %{_sysconfdir}/rpm/macros.hpc +%{_rpmconfigdir}/macros.d/macros.hpc %{_rpmconfigdir}/dlinfo %{_rpmconfigdir}/hpc_elf.pl %{_rpmconfigdir}/fileattrs/*