*** rpm下載網址
http://ftp.isu.edu.tw/pub/Linux/Fedora/linux/core/5/i386/os/Fedora/RPMS/*** rpm 製作
材料:
1. *.c
2. configure
3. README
4. INSTALL
--------------tarball------------
5. spec
1.*.cmain.c
int main() {
printit();
}
printit.c
#include <stdio.h>
void printit{
printf("Hello,world\n");
}
2. configure#!/bin/bash
echo -n "checking System...."
sleep 3
echo "O.K."
cat > Makefile << ENDOFMK
all: hello
hello: main.o printit.o
gcc -o hello main.o printit.o
main.o: main.c
gcc -c main.c
printit.o: printit.c
gcc -c printit.c
fresh:
rm -f hello Makefile
clean:
rm -f hello
install: hello
cp hello /usr/bin
ENDOFMK
註:syntax
Target:Requirement
<tab>command
#comment
4.tarball $mkdir hello.1.0
$mv configure *.c INSTALL README ./hello.1.0/
$tar -zvcf hello-1.0-1.tgz hello.1.0
5.spec$ls /mnt/cdrom/Redhat/RPMS|grep 'rmp.*build'
$rpm -vh rpm-vuild*
$cp hello-1.0.tar.gz /usr/src/redhat/SOURCES/.
$cd /sur/src/redhat/SPECS
$vi hello.spec
Summary: Hello World demo
Name: hello
Version: 1.0
Release: 2
Copyright: GPL
Group: Demo
Source: http://www.study-area.org/linux/src/hw-1.0-2.tgz
Url: http://www.study-area.org
Packager: Netman <netman@study-area.org>
Vendor: study-area
%description
hw is a 'hello world' demon program.
have fun!
%changelog
%prep
rm -fr $RPM_BUILD_DIR/hello-1.0
tar -zxvf $RPM_SOURCE_DIR/hello-1.0.tar.gz
%build
cd $RPM_BUILD_DIR/hello-1.0
. ./configure
make
%install
cd $RPM_BUILD_DIR/hello-1.0
make install
%files
%doc $RPM_BUILD_DIR/hello-1.0/README
/usr/bin/hello
$rpmbuild -ba hello.spec
****yum FC 中安裝中文輸入法
rpm -qa|grep scim
yum search scim
yum install scim-pinyin