1. checkinstall
2. alien
3. ручками:
mkrpm:
#!/bin/bash
PACKAGE_NAME=$1
PACKAGE_DESCRIPTION=$2
PACKAGE_VERSION="`date '+%Y%m%d'`"
# Create temporary directory
mkdir -p "/tmp/$PACKAGE_NAME-$PACKAGE_VERSION"
cd "/tmp/$PACKAGE_NAME-$PACKAGE_VERSION"
cat <<SPEC >"$PACKAGE_NAME.spec"
Summary: $PACKAGE_DESCRIPTION
%define name $PACKAGE_NAME
%define version $PACKAGE_VERSION
Group: Applications/Utils
License: Unknown
Vendor: $LOGNAME
Packager: $LOGNAME
Name: %{name}
Prefix: /
Provides: %{name}
Release: 1
Source: %{name}-%{version}.tar.gz
Version: %{version}
Buildroot: /var/tmp/%{name}-%{version}
BuildArch: noarch
#Package description section:
%description
$PACKAGE_DESCRIPTION
#Prepare to build section:
%prep
%setup -q
#Build section:
%build
# Nothing to do
#Install section
%install
rm -fr \$RPM_BUILD_ROOT
mkdir -p \$RPM_BUILD_ROOT
# Copy files
cp -a . \$RPM_BUILD_ROOT/
#Clean section:
%clean
rm -rf \$RPM_BUILD_ROOT
#List of package files:
%files
#Default attributes of package files
%defattr(-,root,root)
SPEC
# Copy files
cat - >"$PACKAGE_NAME.spec.files"
#Append files
cat "$PACKAGE_NAME.spec.files" >>"$PACKAGE_NAME.spec"
# Make archive
mkdir "$PACKAGE_NAME-$PACKAGE_VERSION"
cat "$PACKAGE_NAME.spec.files"| xargs -l50 \
cp -a --target-directory="$PACKAGE_NAME-$PACKAGE_VERSION" --parents
nice tar cfz "$PACKAGE_NAME-$PACKAGE_VERSION.tar.gz" "$PACKAGE_NAME-$PACKAGE_VERSION"
rm -rf "$PACKAGE_NAME-$PACKAGE_VERSION"
cp "$PACKAGE_NAME-$PACKAGE_VERSION.tar.gz" /usr/src/redhat/SOURCES
cp "$PACKAGE_NAME.spec" /usr/src/redhat/SPECS
nice rpmbuild -ba /usr/src/redhat/SPECS/"$PACKAGE_NAME.spec"
rm -f /usr/src/redhat/SOURCES/"$PACKAGE_NAME-$PACKAGE_VERSION.tar.gz"
rm -f /usr/src/redhat/SPECS/"$PACKAGE_NAME.spec"
rm -rf usr/src/redhat/BUILD/*
rm -f "$PACKAGE_NAME.spec" "$PACKAGE_NAME-$PACKAGE_VERSION.tar.gz"
rm -f "$PACKAGE_NAME.spec.files"
Використання: cat список_файлів_пакету | mkrpm назва_пакету "опис пакету"