]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- define _buildrootdir, dedup _topdir, use _tmppath everywhere rpm.org
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 13 Jan 2020 22:42:30 +0000 (23:42 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 13 Jan 2020 22:42:30 +0000 (23:42 +0100)
macros.pld

index 01f5f0ffb550dc5303689989d257998c4118cefa..fa862085ba5372aba732ec497ba06ea65a5373b8 100644 (file)
@@ -126,13 +126,6 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
 %__rc                  %{_bindir}/rc
 %__xar                 %{_bindir}/xar
 
-%_tmppath              %(echo "${TMPDIR:-/var/tmp}")
-%tmpdir                        %{_tmppath}
-
-%_topdir               %(echo $HOME)/rpm
-
-%buildroot             %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
-
 %_source_payload       w9.gzdio
 %_binary_payload       w6.xzdio
 
@@ -277,6 +270,12 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
        fi; \
 )}%_topdir
 
+%_tmppath              %(echo "${TMPDIR:-/var/tmp}")
+%tmpdir                        %{_tmppath}
+
+%_buildrootdir %{_tmppath}
+%buildroot             %{_buildrootdir}/%{name}-%{version}-%{_arch}-root-%(id -u -n)
+
 # if %{_topdir}/SPECS exists, it's old style structure
 %_specdir              %{expand:%%global _specdir %([ ! -d %{_topdir}/SPECS ] && echo %{_topdir}/%{name} || echo %{_topdir}/SPECS)}%_specdir
 %_sourcedir            %{expand:%%global _sourcedir %([ ! -d %{_topdir}/SOURCES ] && echo %{_specdir} || echo %{_topdir}/SOURCES)}%_sourcedir
@@ -1390,10 +1389,10 @@ fi;
        start=$(expr $base + %1);
        end=$(expr $base + %{?2}%{!?2:%{1}});
        # we need to call seq twice as it doesn't allow two formats
-       seq -f 'Patch%g:' $start $end > %{tmpdir}/__ps1;
-       seq -f '%{-f*}' %1 %{?2}%{!?2:%{1}} > %{tmpdir}/__ps2;
-       paste %{tmpdir}/__ps{1,2};
-       rm -f %{tmpdir}/__ps{1,2};
+       seq -f 'Patch%g:' $start $end > %{_tmppath}/__ps1;
+       seq -f '%{-f*}' %1 %{?2}%{!?2:%{1}} > %{_tmppath}/__ps2;
+       paste %{_tmppath}/__ps{1,2};
+       rm -f %{_tmppath}/__ps{1,2};
 }
 ) \
 %{nil}
This page took 0.092768 seconds and 4 git commands to generate.