notes

来自「bochs : one pc simulator.」· 代码 · 共 49 行

TXT
49
字号
Here's a useful usenet article that shows how to build a filelistinstead of having to specify each one. -----------------------------------------------------------------From: John Ross Hunt (bigboote@mediaone.net)Subject: RE: Newbie to build spec files Newsgroups: linux.redhat.rpmDate: 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 flyand have been using it ever since.  I've always thought RPM should be ableto provide a default %files list in the event one isn't present in the .specfile.--John Ross Huntbigboote@mediaone.net <mailto:bigboote@mediaone.net>%define pkg_name foo%installrm -rf $RPM_BUILD_ROOTmake install DESTDIR=$RPM_BUILD_ROOTcd $RPM_BUILD_ROOTfind . -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}%cleanrm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{pkg_name}%files -f ../file.list.%{pkg_name}%doc README TODO example-----------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?