openSUSE
Tested for release 10.3:
# Define MOINMOIN Version
export MOINVERSION=1.8.2 export MOINFILE=moin-${MOINVERSION}.tar.gz
# Donwload MoinMoin ( To /usr/src/packages/SOURCES/ )
cd /usr/src/packages/SOURCES/ && wget http://static.moinmo.in/files/${MOINFILE}
# Create SPEC File ( in /usr/src/packages/SOURCES/ )
cat > python-moinmoin.spec <<EOF Name: python-moinmoin License: GPL Group: Productivity/Networking/Web/Applications Version: 0.0.0 Release: 1 Summary: Advanced, easy to use and extensible WikiEngine URL: http://moinmo.in/MoinMoinWiki # Source: http://static.moinmo.in/files/moin-%{version}.tar.gz Source: moin-%{version}.tar.gz BuildRoot: %{_tmppath}/moin-%{version}-build Prefix: %{_prefix} Packager: Public %py_requires BuildRequires: python-devel >= 2.4 , crunzip Requires: python >= 2.4 Requires: python-xml Provides: moin = %{version} Obsoletes: moin <= %{version}-%{release} %description MoinMoin is an advanced, easy to use and extensible WikiEngine with a large community of users. Said in a few words, it is about collaboration on easily editable web pages. %prep %setup -n moin-%{version} %build export CFLAGS="\$RPM_OPT_FLAGS" %{__python} setup.py build %install python setup.py install --root=\$RPM_BUILD_ROOT \\ --record-rpm=INSTALLED_FILES --prefix=%{_prefix} %clean [ "\$RPM_BUILD_ROOT" != "/" ] && rm -rf \$RPM_BUILD_ROOT %files -f INSTALLED_FILES %defattr(-,root,root) %doc README docs/* %changelog * Thu Apr 16 2009 Public - $MOINVERSION - Updated to $MOINVERSION * Tue Jun 24 2008 Ben Haggaer - 1.7.0 - Updated to 1.7.0 * Sun Apr 20 2008 Ben Haggaer - 1.6.2 - Updated to 1.6.2, added python-xml requirement * Wed Jan 02 2008 Ben Haggaer - 1.6.0 - Updated to 1.6 and merged spec from mrueckert@suse.de version * Wed Sep 05 2007 Ben Haggaer - 1.5.8 - Initial attempt at build for opensuse 10.2+ * Sun Mar 11 2007 Dag Wieers <dag@wieers.com> - 1.5.7-1 - Initial package. EOF
# Patch SPEC File to MOINVERSION
perl -p -i -e "s/^Version:.*/Version: $MOINVERSION/" python-moinmoin.spec
# Build Package ( Ignore warnings )
rpmbuild -bb python-moinmoin.spec
# verify build - Check RPM Package content
rpm -qlp /usr/src/packages/RPMS/i586/python-moinmoin-$MOINVERSION-1.i586.rpm
# Change back we we cpome from
cd -
Notes: