2
Summary: A small lighttpd
Name: lighttpd
Version: 1.4.28
Release: 1000

License: LGPL
Group: Applications/Webserver
URL: http://www.lighttpd.com/
Source: http://www.lighttpd.com/lighttpd-%{version}.tar.gz
BuildRoot: %{name}-%{version}
Prefix: /opt/src/Opensource/lighttpd-1.4.28/install
#Do not terminate if there are files in the buildroot that are not packed into the rpm.
%define _unpackaged_files_terminate_build       0
#Do not terminate if there are any documents missing in the buildroot dir and not      packaged
%define _missing_doc_files_terminate_build      0
%description
A small foot print webserver
%files
%defattr(-, root, root, 0755)
#%doc README
/sbin/lighttpd
/lib/mod_auth.so
/lib/mod_cgi.so
/lib/mod_cml.so
/lib/mod_compress.so
これを考えると、次のコマンドを使用してrpmをビルドします
rpmbuild -bb --buildroot /opt/src/Opensource/lighttpd-1.4.28/install lightppd.spec
生成されたrpmのrpm-qpiは、次の出力を提供します
名前:lighttpd再配置:/opt/src/Opensource/lighttpd-1.4.28/install
バージョン:1.4.28ベンダー:リポジトリ
リリース:1000ビルド日:2011年7月19日火曜日05:17:44 PM PDT
インストール日:(インストールされていません)ビルドホスト:
グループ:アプリケーション/ウェブサーバーソースRPM:lighttpd-1.4.28-1000.src.rpm
サイズ:259873ライセンス:LGPL
署名:(なし)

インストール中にコマンドを発行します

rpm -ivh --prefix / opt / components / --dbpath / opt / rpm / database

rpmをインストールします

しかし、/ opt/componentsの場所にインストールされているインストールディレクトリやファイルが表示されません
4

1 に答える 1

1

http://www.rpm.org/max-rpm/s1-rpm-reloc-wrinkles.htmlを確認してください。特に、「%files セクションのファイルはプレフィックス タグ行で開始する必要があります」という最初の箇条書きを確認してください。

%files セクションのファイル名の前に「/opt/src/Opensource/lighttpd-1.4.28/install」を付けて、rpm を再構築し、インストールを再試行してください。

于 2012-03-30T05:21:53.513 に答える