LoginSignup
0
0

More than 5 years have passed since last update.

RedSleeve6をQEMUにインストールし開発環境にする(その4)

Last updated at Posted at 2016-08-14

続き
http://qiita.com/hkato/items/7e8876f5bf20fd38c00a

slコマンドのRPM化

slでRPM化の練習をしてみる^^;

rpmbuild環境の作成

# yum install rpmdevtools createrepo yum-utils

ホームディレクトリにrpm開発ツリーを作る

$ rpmdev-setuptree

ソース取得と依存ライブラリのヘッダーをインストール

slのtarボールを取得しSOURCESに

$ cd ~/rpmbuild/SOURCES/
$ wget https://github.com/mtoyoda/sl/archive/5.02.tar.gz

依存ライブラリのヘッダーをインストール

# yum install ncurses-devel

SPECファイルの作成

$ cd ~/rpmbuild/SPECS/
$ vi sl.spec

作成したspecファイルはこちら、
https://gist.github.com/hkato/27f75957da21c5b9ffdfef22c9bee1fe

ビルド

~/rpmbuild/SPECS/で実行すること

$ rpmbuild -ba sl.spec

とりあえずローカル開発環境/QEMUに直インストール

$ cd ~/rpmbuild/RPMS/armv5tel/
# rpm -ivh sl-5.02-1.armv5tel.rpm 

ターゲット環境にインストール

TODO: 帰省中なので手元にターゲット環境がないので未確認、帰ったらやる

コピってインストールする

[user@qemu ~/rpmbuild/RPMS/armv5tel]$ scp sl-5.02-1.armv5tel.rpm root@target:/tmp/
[user@qemu ~/rpmbuild/RPMS/armv5tel]$ ssh root@target
[root@target ~]# rpm -ivh /tmp/sl-5.02-1.armv5tel.rpm

まとめ

こんな感じでQEMUでIO DATA RockDiskNext(やRaspberryPi/RSEL)のarmv5tel.rpmなパッケージをビルドできる。
大抵のものはspec/srpmファイルが用意されてるし、無いものはCheckinstall
http://qiita.com/tags/Checkinstall
でいけるはず。

0
0
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
0
0