LoginSignup
13
13

More than 5 years have passed since last update.

rpmbuild環境と便利なコマンド

Last updated at Posted at 2014-12-12

必要なパッケージをインストール

sudo yum install -y rpmdevtools yum-utils

環境を構築

$ rpmdev-setuptree
$ tree -L 1 rpmbuild/ 
rpmbuild/
├── BUILD
├── BUILDROOT
├── RPMS
├── SOURCES
├── SPECS
└── SRPMS

specファイルに含まれているソースやパッチをダウンロードして展開する

$ spectool -g -R ./your-spec.spec

# specに含まれるソースやパッチの一覧を表示
$ spectool -l ./your-spec.spec

specの BuildRequires に指定されてるものをインストールする

$ sudo yum-builddep ./your-spec.spec

ビルド環境の変数とかマクロとか確認する

$ rpm --showrc

ビルドする

$ rpmbuild -ba ./your-spec.spec

参考
http://www.sssg.org/blogs/naoya/archives/1309
http://vinelinux.org/docs/vine6/making-rpm/env-and-macro.html

13
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13