SSブログ

eggxのrpmパッケージ [Vine 5.2]

eggxという、Xで動くグラフィックライブラリがあります。シミュレーションの動画作成などで愛用しています。作者の方、ありがとうございます。(eggx使用例:7重振り子シミュレーション動画

複数のマシン(Vine Linuxが動いています)にeggxをインストールしているのですが、あるデスクトップマシンに入っていたeggxが古かったので、アップデートすることにしました。
せっかくだから、と、rpmパッケージを作ることにしてみた、というお話。

eggxでは、旧版(ver.0.81)用のspecファイルが公式サイトで配布されています。それをもとにやってみました。何だよーずるいじゃないかー、と思われた方、ごめんなさいです。

rpmの作成において参考にした文献は、Vine Linux オンラインマニュアル。(ドキュメント作成のかた、ありがとうございます。)

パート II. 基本的なパッケージ作成の流れ

RPMパッケージの作成方法

第5章 SPECファイルの記述


変更した箇所の主なものは下記の通り:
  • Makefile中で、ライブラリの場所などが違っていたので修正 → パッチを作成
  • ソースファイルを最新の ver.0.93r3 を使用するように指定
  • 付属文書名がいくつか変更になったので、filesセクションを変更

で、こんな感じです:
  • specファイル差分:
$ cat eggx-0.81-0.93r3.spec.diff.txt
1,2c1,2
< %define vername    0.81
< #%define relname    r1
---
> %define vername    0.93
> %define relname    r3
4,5c4
< # RPM_BUILD_ROOT=/home/ayu/src/eggx rpmbuild eggx.spec
< #%define _topdir /home/ayu/src/eggx
---
10c9
< Version: 0.81
---
> Version: 0.93
14,15c13
< #Source: http://phe.phyas.aichi-edu.ac.jp/~cyamauch/eggx_procall/%{name}-%{vername}%{relname}.tar.gz
---
> Source: http://phe.phyas.aichi-edu.ac.jp/~cyamauch/eggx_procall/%{name}-%{vername}%{relname}.tar.gz
18,19c16,17
< Requires: gcc, XFree86
< BuildRequires: gcc, XFree86
---
> Requires: gcc, xorg-x11-devel
> BuildRequires: gcc, xorg-x11-devel
21c19
< #Patch: EGGX080.patch
---
> Patch: eggx-0.93r3.patch
29,30c27,28
< %setup -q -n %{name}-%{vername}
< #%patch -p1
---
> %setup -q -n %{name}-%{vername}%{relname}
> %patch -p1
47c45,46
< cp -rf sample %{buildroot}%{instdir}/src/eggx/
---
> # cp -rf sample %{buildroot}%{instdir}/src/eggx/
> cp -rf examples_tutorial %{buildroot}%{instdir}/src/eggx/
50,54c49,58
< cp -f ChangeLog %{buildroot}%{instdir}/doc/eggx/
< cp -f KNOWNBUGS %{buildroot}%{instdir}/doc/eggx/
< cp -f TODO %{buildroot}%{instdir}/doc/eggx/
< cp -f readme.txt %{buildroot}%{instdir}/doc/eggx/
< cp -f eggx_procall.ps %{buildroot}%{instdir}/doc/eggx/
---
> cp -f ChangeLog.ja %{buildroot}%{instdir}/doc/eggx/
> cp -f KNOWNBUGS.ja %{buildroot}%{instdir}/doc/eggx/
> cp -f TECHNICAL.ja %{buildroot}%{instdir}/doc/eggx/
> cp -f EXAMPLES.ja %{buildroot}%{instdir}/doc/eggx/
> cp -f INSTALL.ja %{buildroot}%{instdir}/doc/eggx/
> cp -f README.ja %{buildroot}%{instdir}/doc/eggx/
> cp -f LICENSE %{buildroot}%{instdir}/doc/eggx/
> cp -f 00README.1st.ja.UTF-8 %{buildroot}%{instdir}/doc/eggx/
> cp -f TODO.ja %{buildroot}%{instdir}/doc/eggx/
> cp -f eggx_procall.pdf %{buildroot}%{instdir}/doc/eggx/
69,79c73,88
< %{instdir}/src/eggx/sample/Makefile
< %{instdir}/src/eggx/sample/*.c
< %{instdir}/src/eggx/sample/*.h
< %{instdir}/src/eggx/sample/*.ppm
< %{instdir}/src/eggx/sample/FORTRAN/Makefile
< %{instdir}/src/eggx/sample/FORTRAN/*.f
< %{instdir}/doc/eggx/ChangeLog
< %{instdir}/doc/eggx/KNOWNBUGS
< %{instdir}/doc/eggx/TODO
< %{instdir}/doc/eggx/readme.txt
< %{instdir}/doc/eggx/eggx_procall.ps
---
> %{instdir}/src/eggx/examples_tutorial/Makefile
> %{instdir}/src/eggx/examples_tutorial/*.c
> %{instdir}/src/eggx/examples_tutorial/*.h
> %{instdir}/src/eggx/examples_tutorial/*.ppm
> %{instdir}/src/eggx/examples_tutorial/FORTRAN/Makefile
> %{instdir}/src/eggx/examples_tutorial/FORTRAN/*.f
> %{instdir}/doc/eggx/ChangeLog.ja
> %{instdir}/doc/eggx/TECHNICAL.ja
> %{instdir}/doc/eggx/KNOWNBUGS.ja
> %{instdir}/doc/eggx/EXAMPLES.ja
> %{instdir}/doc/eggx/INSTALL.ja
> %{instdir}/doc/eggx/README.ja
> %{instdir}/doc/eggx/LICENSE
> %{instdir}/doc/eggx/00README.1st.ja.UTF-8
> %{instdir}/doc/eggx/TODO.ja
> %{instdir}/doc/eggx/eggx_procall.pdf
81a91,93
> * Wed May 25 2011 Tetsuro KONISHI <tkonishi@r.phys.nagoya-u.ac.jp>
> - A version for personal use on Vine Linux 5.2 (i386)
>   eggx version : 0.93r3, This specfile is based on that of eggx 0.81.

  • Makefile差分:
$ cat eggx-0.93r3.patch
diff -uNr eggx-0.93r3.org/Makefile eggx-0.93r3/Makefile
--- eggx-0.93r3.org/Makefile 2011-05-25 16:07:10.000000000 +0900
+++ eggx-0.93r3/Makefile 2011-05-25 16:07:38.000000000 +0900
@@ -18,17 +18,17 @@
 #USERFC   = ifc
 
 #X11/Xlib.h のあるディレクトリ
-IINC  = -I/usr/X11R7/include -I/usr/X11R6/include
+#IINC  = -I/usr/X11R7/include -I/usr/X11R6/include
 #IINC  = -I/usr/openwin/include
 #IINC  = -I/usr/local/X11R6/include
-#IINC  = -I/usr/include
+IINC  = -I/usr/include
 
 #libX11.a libX11.so のあるディレクトリ
-LLIB  = -L/usr/X11R7/lib -L/usr/X11R6/lib
+#LLIB  = -L/usr/X11R7/lib -L/usr/X11R6/lib
 #LLIB  = -L/usr/X11R7/lib64 -L/usr/X11R6/lib64
 #LLIB  = -L/usr/openwin/lib
 #LLIB  = -L/usr/local/X11R6/lib
-#LLIB  = -L/usr/lib
+LLIB  = -L/usr/lib
 
 PREFIX = /usr/local
 
diff -uNr eggx-0.93r3.org/Makefile.linux eggx-0.93r3/Makefile.linux
--- eggx-0.93r3.org/Makefile.linux 2011-05-25 16:07:10.000000000 +0900
+++ eggx-0.93r3/Makefile.linux 2011-05-25 16:07:38.000000000 +0900
@@ -18,17 +18,17 @@
 #USERFC   = ifc
 
 #X11/Xlib.h のあるディレクトリ
-IINC  = -I/usr/X11R7/include -I/usr/X11R6/include
+#IINC  = -I/usr/X11R7/include -I/usr/X11R6/include
 #IINC  = -I/usr/openwin/include
 #IINC  = -I/usr/local/X11R6/include
-#IINC  = -I/usr/include
+IINC  = -I/usr/include
 
 #libX11.a libX11.so のあるディレクトリ
-LLIB  = -L/usr/X11R7/lib -L/usr/X11R6/lib
+#LLIB  = -L/usr/X11R7/lib -L/usr/X11R6/lib
 #LLIB  = -L/usr/X11R7/lib64 -L/usr/X11R6/lib64
 #LLIB  = -L/usr/openwin/lib
 #LLIB  = -L/usr/local/X11R6/lib
-#LLIB  = -L/usr/lib
+LLIB  = -L/usr/lib
 
 PREFIX = /usr/local
 

解説を見ながら見よう見まねでやってみたので、これで正しいかどうか自信ゼロです。が、今回作ったspecファイルから rpmbuild -bb eggx-0.93r3.specとして作成した eggxのrpmパッケージをVine 5.2のマシンにインストールしたところ、正常に動作しているようです。

タグ:eggx rpm Vine Linux
nice!(0)  コメント(0)  トラックバック(0) 

nice! 0

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

※ブログオーナーが承認したコメントのみ表示されます。

トラックバック 0

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。