ghc_gen_filelists: support packages with multiple license files
move licenses out of docdir instead of removing, also for ghc_bin_install
This commit is contained in:
parent
84a7696ad1
commit
c43600a4a0
@ -10,7 +10,7 @@
|
||||
#%%global without_hscolour 1
|
||||
|
||||
Name: ghc-rpm-macros
|
||||
Version: 1.6.5
|
||||
Version: 1.6.6
|
||||
Release: 1%{?dist}
|
||||
Summary: RPM macros for building packages for GHC
|
||||
|
||||
@ -135,6 +135,10 @@ EOF
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 26 2016 Jens Petersen <petersen@redhat.com> - 1.6.6-1
|
||||
- ghc_gen_filelists: support packages with more than one license file
|
||||
- move licenses out of docdir instead of removing, also for ghc_bin_install
|
||||
|
||||
* Thu Aug 25 2016 Jens Petersen <petersen@redhat.com> - 1.6.5-1
|
||||
- ghc_gen_filelists now handles license files automatically
|
||||
|
||||
|
10
macros.ghc
10
macros.ghc
@ -80,9 +80,11 @@ fi\
|
||||
if [ -d "%{buildroot}%{docdir}" ]; then\
|
||||
echo "%{docdir}" >> %{basepkg}-devel.files\
|
||||
fi\
|
||||
license_file=$(ls %{buildroot}%{_docdir}/%{basepkg}/)\
|
||||
echo "%%license %{pkgnamever}/$license_file" >> %{basepkg}.files\
|
||||
rm %{buildroot}%{_docdir}/ghc-$name/$license_file\
|
||||
for i in $(ls %{buildroot}%{_docdir}/%{basepkg}/); do\
|
||||
echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\
|
||||
mkdir -p %{buildroot}%{_licensedir}/%{basepkg}\
|
||||
mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_licensedir}/%{basepkg}/\
|
||||
done\
|
||||
for i in %{basepkg}.files %{basepkg}-devel.files; do\
|
||||
if [ -f "$i" ]; then\
|
||||
sed -i -e "s!%{buildroot}!!g" $i\
|
||||
@ -139,6 +141,8 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \
|
||||
%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\
|
||||
%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\
|
||||
%cabal_install\
|
||||
mkdir -p %{buildroot}%{_licensedir}/%{name}\
|
||||
mv %{buildroot}%ghc_pkgdocdir/* %{buildroot}%{_licensedir}/%{name}/\
|
||||
%{!?1:%ghc_strip_dynlinked}\
|
||||
%{nil}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user