- 追加された行はこの色です。
- 削除された行はこの色です。
* SPECファイルを作る [#i32fe4c6]
ここではSlony-I ver 1.2.9のパッケージを作る。specファイルは以下の通り。
Summary: Slony-I
Name: slony1
Version: 1.2.9
Release: 1
Source0: %{name}-%{version}.tar.bz2
License: GPL
Group: Applications/Databases
BuildRoot: %{_builddir}/%{name}-root
%description
Slony-I is a "master to multiple slaves" replication system
supporting cascading and failover.
%define prefix /usr/local
%prep
%setup -q
%build
./configure --prefix=%{prefix}
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{prefix}/bin/*
%{_libdir}/pgsql/slony1_funcs.so
%{_libdir}/pgsql/xxid.so
%{_datadir}/pgsql/*.sql
- ソースファイルはslony1-1.2.9.tar.bz2というファイル名でRPM_DIR/SOURCES/以下に置く。
- $RPM_BUILD_DIRはOSの環境に応じて、/usr/src/redhat/BUILD/や$HOME/RPM/BUILD/を指す。
- %filesセクションにはインストールするファイルを列挙する。いったん仮ディレクトリなどに手動でインストールをしてみて、インストールされるファイルを確認しておくとよい。
- ここで使われているマクロ変数のデフォル値は以下の通り。%defineで自分でマクロを定義出来る。
- %{_prefix} /usr
- %{_bindir} %{_prefix}/bin
- %{_libdir} %{_prefix}/lib
- %{_datadir} %{_prefix}/share
*** グループ名 [#sdb944b9]
$ cat /usr/share/doc/rpm-4.4.2/GROUPS
Amusements/Games
Amusements/Graphics
Applications/Archiving
Applications/Communications
Applications/Databases
Applications/Editors
Applications/Emulators
Applications/Engineering
Applications/File
Applications/Internet
Applications/Multimedia
Applications/Productivity
Applications/Publishing
Applications/System
Applications/Text
Development/Debuggers
Development/Languages
Development/Libraries
Development/System
Development/Tools
Documentation
System Environment/Base
System Environment/Daemons
System Environment/Kernel
System Environment/Libraries
System Environment/Shells
User Interface/Desktops
User Interface/X
User Interface/X Hardware Support
** specファイルからRPMパッケージを作る [#k951263c]
rpmbuild -ba slony-1.29-1.spec
** 参考 [#n8bb0e4a]
- http://www-06.ibm.com/jp/developerworks/linux/020125/j_l-rpm1.html
- http://www-06.ibm.com/jp/developerworks/linux/020222/j_l-rpm2.html
- http://nekomimists.ddo.jp/~tom/nekokick/rpm.html