modification de .spec:

- pour qu'il genere 2 packages (glasnost, glanost-gtk)
- creation de package noarch
- ajout d'une dependance a python-docutils
amelioration du makefile pour la construction du rpm
This commit is contained in:
bpoussin 2003-06-30 16:16:26 +00:00
parent d16f615156
commit 02123d15cc
2 changed files with 55 additions and 16 deletions

View File

@ -39,6 +39,7 @@
NAME=glasnost
#check if exist in glasnost-variables-filename
RELEASE_TYPE=-devel
RPM_RELEASE=1
GLASNOST=$(NAME)$(RELEASE_TYPE)
PORT=9000
VERSION=20030112
@ -57,6 +58,7 @@ TESTS_SUITE = suites
# LOGPREFIX=/var/log
PREFIX=/usr/local
PREFIX_QUOTED=$(subst /,\/,$(PREFIX))
VARPREFIX=/var/lib
SHAREPREFIX=$(PREFIX)/share
LOGPREFIX=/var/log
@ -102,7 +104,7 @@ WEB_GROUP=www-data
TEMPLATES=default april bxlug codelutin.org cuisine easter-eggs entrouvert.com entrouvert2 glasnost2 lightbulb macfly plane september vecam theridion entrouvert.be
RPM_PACKAGE_NAME=python$(PYTHON_VERSION)-tal python$(PYTHON_VERSION)-imaging
RPM_PACKAGE_NAME=python$(PYTHON_VERSION)-tal python$(PYTHON_VERSION)-imaging python$(PYTHON_VERSION)-docutils
.PHONY: $(GLASNOST)-variables help archive clean-data data-archive dist dist-clean install-create-dir install-glasnost install-data install-extensions install-gtk install-locale install-log install-python-libs install-scripts install-servers install-templates install-tests install-web install mo po glasnost.spec rpm rpm-depend run-tests system tests uninstall-tests uninstall
@ -126,7 +128,7 @@ help:
@echo "SHAREPREFIX (default=${SHAREPREFIX})"
@echo "LOGPREFIX (default=${LOGPREFIX})"
@echo
@echo "example: make GLASNOST=glasnost VERSION=6.0 PYTHON_VERSION=2.2 PREFIX=/usr rpm"
@echo "example: make GLASNOST=glasnost VERSION=0.6.0 RPM_RELEASE=1 PYTHON_VERSION=2.2 PREFIX=/usr PORT=8000 rpm"
archive: dist-clean
cd .. ; \
@ -412,10 +414,17 @@ po: glasnost-web/ \
glasnost.spec: redhat/glasnost.spec.in Makefile
cat $< | sed -e "s/^%define PYTHON_VERSION .*/%define PYTHON_VERSION ${PYTHON_VERSION}/" \
-e "s/^%define ver .*/%define ver ${VERSION}/" \
-e "s/^%define rel .*/%define rel ${RPM_RELEASE}/" \
-e "s/^%define prefix .*/%define prefix ${PREFIX_QUOTED}/" \
-e "s/^%define nam .*/%define nam ${GLASNOST}/" > $@
rpm: glasnost.spec dist rpm-depend
redhat/README.redhat: debian/README.Debian
cat $< | sed -e "s/for Debian//" > $@
rpm: glasnost.spec redhat/README.redhat dist rpm-depend
$(RPM) -ta ../$(DIST_FILE)
cp /usr/src/rpm/RPMS/noarch/${NAME}-${VERSION}-${RPM_RELEASE}.noarch.rpm redhat
cp /usr/src/rpm/RPMS/noarch/${NAME}-gtk-${VERSION}-${RPM_RELEASE}.noarch.rpm redhat
rpm-depend:
apt-get install --download-only $(RPM_PACKAGE_NAME)

View File

@ -1,22 +1,32 @@
%define ver 0.5.5
%define rel 1
%define nam glasnost
%define prefix /usr
%define PYTHON_VERSION 2.1
Summary: Glasnost
%define ver x.x.x
%define rel x
%define nam xxxxxxx
%define prefix /xxx
%define PYTHON_VERSION x.x
Summary: This package provides the basic framework and web interfaces.
Name: %{nam}
Version: %ver
Release: %rel
Copyright: GPL
Copyright: GPL
Group: Applications/Réseau
Source: %{nam}-%ver.tar.gz
URL: http://glasnost.entrouvert.org/
Packager: Benjamin POUSSIN <poussin@codelutin.com>
Requires: sed python%{PYTHON_VERSION}-imaging python%{PYTHON_VERSION}-tal httpd mod_python libxslt
Requires: sed python%{PYTHON_VERSION}-imaging python%{PYTHON_VERSION}-tal httpd mod_python libxslt PyXML python%{PYTHON_VERSION}-docutils
BuildRoot: /var/tmp/%{name}-buildroot
BuildArchitectures: noarch
%description
Glasnost
Glasnost is the voting system originally developed by Easter-eggs for
in-house decision making and now also used in other places.
It evolved from a simple voting system to a complex content management system
with many features (collaborative redaction, calendar...)
%package gtk
Summary: This package provides the GTK+ GUI interface to Glasnost.
Group: Applications/Réseau
%description gtk
This package provides the GTK+ GUI interface to Glasnost.
%prep
@ -28,10 +38,15 @@ make DESTDIR=$RPM_BUILD_ROOT PREFIX=%{prefix} mo
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
make WEB_USER=apache WEB_GROUP=root DESTDIR=$RPM_BUILD_ROOT DONT_USE_DESTDIR_FOR_LINK=true install
make WEB_USER=root WEB_GROUP=root DESTDIR=$RPM_BUILD_ROOT DONT_USE_DESTDIR_FOR_LINK=true install
mkdir -p $RPM_BUILD_ROOT/etc/init.d
cp redhat/glasnost-redhat-init.d $RPM_BUILD_ROOT/etc/init.d/glasnost
mkdir -p $RPM_BUILD_ROOT/etc/cron.hourly
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/doc/%{nam}
cp redhat/README.redhat $RPM_BUILD_ROOT%{prefix}/share/doc/%{nam}/README
cp README.config $RPM_BUILD_ROOT%{prefix}/share/doc/%{nam}
cp COPYING $RPM_BUILD_ROOT%{prefix}/share/doc/%{nam}
%clean
rm -rf $RPM_BUILD_ROOT
@ -39,7 +54,13 @@ rm -rf $RPM_BUILD_ROOT
%files
%config(noreplace) /etc/%{nam}/config
/etc/init.d/%{nam}
%{prefix}/lib/%{nam}
%{prefix}/lib/%{nam}/servers
%{prefix}/lib/%{nam}/web
%{prefix}/lib/%{nam}/glasnost/__init__.py
%{prefix}/lib/%{nam}/glasnost/common
%{prefix}/lib/%{nam}/glasnost/proxy
%{prefix}/lib/%{nam}/glasnost/server
%{prefix}/lib/%{nam}/glasnost/web
%{prefix}/sbin/%{nam}
%{prefix}/sbin/glasnost-variables-filename
%{prefix}/sbin/%{nam}-variables
@ -47,12 +68,21 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/sbin/%{nam}-export
%{prefix}/sbin/%{nam}-make-system
%{prefix}/sbin/%{nam}-convert-ids
%{prefix}/sbin/%{nam}-add-people-ldap.py
/var/lib/%{nam}
%{prefix}/share/%{nam}
/var/log/%{nam}
%{prefix}/lib/python%{PYTHON_VERSION}/site-packages/%{nam}
%{prefix}/share/locale/de/LC_MESSAGES/%{nam}-web.mo
%{prefix}/share/locale/fi/LC_MESSAGES/%{nam}-web.mo
%{prefix}/share/locale/fr/LC_MESSAGES/%{nam}-web.mo
%{prefix}/share/locale/sv/LC_MESSAGES/%{nam}-web.mo
%{prefix}/share/doc/%{nam}
%files gtk
%{prefix}/bin/%{name}-gtk
%{prefix}/lib/%{name}/glasnost/gtk
%changelog
* Mon Jun 30 2003 Benjamin POUSSIN <poussin@codelutin.com> 0.6.3
- split in two package: glasnost, glasnost-gtk
- added dependancy: python-docutils, PyXML
- construct noarch rpm