Files
fail/bochs/build/redhat/NOTES
hsc b70b6fb43a another directory rename: failstar -> fail
"failstar" sounds like a name for a cruise liner from the 80s.  As "*" isn't a
desirable part of directory names, just name the whole thing "fail/", the core
parts being stored in "fail/core/".

Additionally fixing two build system dependency issues:
 - missing jobserver -> protomessages dependency
 - broken bochs -> fail dependency (add_custom_target DEPENDS only allows plain
   file dependencies ... cmake for the win)


git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@956 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-03-08 19:43:02 +00:00

49 lines
1.4 KiB
Plaintext

Here's a useful usenet article that shows how to build a filelist
instead of having to specify each one.
-----------------------------------------------------------------
From: John Ross Hunt (bigboote@mediaone.net)
Subject: RE: Newbie to build spec files
Newsgroups: linux.redhat.rpm
Date: 2000/07/27
> So, is there a better way, in RPM 3, to populate %files?
> Because I know
> 'buildroot' and it has nothing to do with %files.
I found this bit of code in a .spec file to build a %files list on the fly
and have been using it ever since. I've always thought RPM should be able
to provide a default %files list in the event one isn't present in the .spec
file.
--
John Ross Hunt
bigboote@mediaone.net <mailto:bigboote@mediaone.net>
%define pkg_name foo
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
$RPM_BUILD_DIR/file.list.%{pkg_name}
find . -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \
-e '/\/etc\//s|^|%config|' >> \
$RPM_BUILD_DIR/file.list.%{pkg_name}
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
$RPM_BUILD_DIR/file.list.%{pkg_name}
%clean
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{pkg_name}
%files -f ../file.list.%{pkg_name}
%doc README TODO example
-----------------------------------------------------------------