Hi there, tried to build an RPM of mailman and I found that it's not easy to do so with a plain vannila spec file.. Here I include a patch that allows easy creation of RPMs which you might want to include it in you next release, but then again, you might not coz I believe it's an ugly hack ;) and it's also not fhs compliant.. diff -u -r mailman-2.0/Mailman/Archiver/Makefile.in mailman-2.0rc3/Mailman/Archiver/Makefile.in --- mailman-2.0/Mailman/Archiver/Makefile.in Tue Mar 21 14:25:10 2000 +++ mailman-2.0rc3/Mailman/Archiver/Makefile.in Fri Nov 24 16:40:12 2000 @@ -59,7 +59,7 @@ install: for f in $(MODULES); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(PACKAGEDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(PACKAGEDIR); \ done finish: diff -u -r mailman-2.0/Mailman/Bouncers/Makefile.in mailman-2.0rc3/Mailman/Bouncers/Makefile.in --- mailman-2.0/Mailman/Bouncers/Makefile.in Tue Mar 21 14:25:35 2000 +++ mailman-2.0rc3/Mailman/Bouncers/Makefile.in Fri Nov 24 16:41:45 2000 @@ -57,7 +57,7 @@ install: for f in $(MODULES); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(PACKAGEDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(PACKAGEDIR); \ done finish: diff -u -r mailman-2.0/Mailman/Cgi/Makefile.in mailman-2.0rc3/Mailman/Cgi/Makefile.in --- mailman-2.0/Mailman/Cgi/Makefile.in Tue Mar 21 14:25:43 2000 +++ mailman-2.0rc3/Mailman/Cgi/Makefile.in Fri Nov 24 16:42:19 2000 @@ -59,7 +59,7 @@ install: for f in $(CGI_MODULES); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(CGIDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(CGIDIR); \ done finish: diff -u -r mailman-2.0/Mailman/Handlers/Makefile.in mailman-2.0rc3/Mailman/Handlers/Makefile.in --- mailman-2.0/Mailman/Handlers/Makefile.in Tue Mar 21 14:25:51 2000 +++ mailman-2.0rc3/Mailman/Handlers/Makefile.in Fri Nov 24 16:42:40 2000 @@ -57,7 +57,7 @@ install: for f in $(MODULES); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(PACKAGEDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(PACKAGEDIR); \ done finish: diff -u -r mailman-2.0/Mailman/Logging/Makefile.in mailman-2.0rc3/Mailman/Logging/Makefile.in --- mailman-2.0/Mailman/Logging/Makefile.in Sat Jun 3 06:13:10 2000 +++ mailman-2.0rc3/Mailman/Logging/Makefile.in Fri Nov 24 16:42:53 2000 @@ -57,7 +57,7 @@ install: for f in $(MODULES); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(PACKAGEDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(PACKAGEDIR); \ done finish: diff -u -r mailman-2.0/Mailman/Makefile.in mailman-2.0rc3/Mailman/Makefile.in --- mailman-2.0/Mailman/Makefile.in Tue Mar 21 14:24:59 2000 +++ mailman-2.0rc3/Mailman/Makefile.in Fri Nov 24 16:41:25 2000 @@ -64,12 +64,12 @@ install-here: for f in $(MODULES); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(PACKAGEDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(PACKAGEDIR); \ done - $(INSTALL) -m $(FILEMODE) mm_cfg.py.dist $(PACKAGEDIR) - if [ ! -f $(PACKAGEDIR)/mm_cfg.py ]; \ + $(INSTALL) -m $(FILEMODE) mm_cfg.py.dist $(DESTDIR)$(PACKAGEDIR) + if [ ! -f $(DESTDIR)$(PACKAGEDIR)/mm_cfg.py ]; \ then \ - $(INSTALL) -m $(FILEMODE) mm_cfg.py.dist $(PACKAGEDIR)/mm_cfg.py; \ + $(INSTALL) -m $(FILEMODE) mm_cfg.py.dist $(DESTDIR)$(PACKAGEDIR)/mm_cfg.py; \ fi install: install-here diff -u -r mailman-2.0/Mailman/pythonlib/Makefile.in mailman-2.0rc3/Mailman/pythonlib/Makefile.in --- mailman-2.0/Mailman/pythonlib/Makefile.in Tue Mar 21 14:26:05 2000 +++ mailman-2.0rc3/Mailman/pythonlib/Makefile.in Fri Nov 24 16:43:05 2000 @@ -58,7 +58,7 @@ install: for f in $(MODULES); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(PACKAGEDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(PACKAGEDIR); \ done finish: diff -u -r mailman-2.0/Makefile.in mailman-2.0rc3/Makefile.in --- mailman-2.0/Makefile.in Fri Sep 22 16:06:19 2000 +++ mailman-2.0rc3/Makefile.in Fri Nov 24 17:01:48 2000 @@ -82,7 +82,7 @@ @echo "Creating architecture independent directories..." @for d in $(VAR_DIRS); \ do \ - dir=$(var_prefix)/$$d; \ + dir=$(DESTDIR)$(var_prefix)/$$d; \ if test ! -d $$dir; then \ echo "Creating directory hierarchy $$dir"; \ ./mkinstalldirs $$dir; \ @@ -91,10 +91,10 @@ else true; \ fi; \ done - chmod o-r $(var_prefix)/archives/private + chmod o-r $(DESTDIR)$(var_prefix)/archives/private @for d in $(ARCH_INDEP_DIRS); \ do \ - dir=$(prefix)/$$d; \ + dir=$(DESTDIR)$(prefix)/$$d; \ if test ! -d $$dir; then \ echo "Creating directory hierarchy $$dir"; \ ./mkinstalldirs $$dir; \ @@ -106,7 +106,7 @@ @echo "Creating architecture dependent directories..." @for d in $(ARCH_DEP_DIRS); \ do \ - dir=$(exec_prefix)/$$d; \ + dir=$(DESTDIR)$(exec_prefix)/$$d; \ if test ! -d $$dir; then \ echo "Creating directory hierarchy $$dir"; \ ./mkinstalldirs $$dir; \ @@ -119,7 +119,7 @@ do \ (cd $$d; $(MAKE) install); \ done - $(PYTHON) -c 'from compileall import *; compile_dir("$(prefix)/Mailman")' + $(PYTHON) -c 'from compileall import *; compile_dir("$(DESTDIR)$(prefix)/Mailman")' update: @(cd $(prefix) ; bin/update) | tee ./update.log diff -u -r mailman-2.0/bin/Makefile.in mailman-2.0rc3/bin/Makefile.in --- mailman-2.0/bin/Makefile.in Fri May 5 06:51:31 2000 +++ mailman-2.0rc3/bin/Makefile.in Fri Nov 24 16:45:36 2000 @@ -62,7 +62,7 @@ install: for f in $(SCRIPTS); \ do \ - $(INSTALL) -m $(EXEMODE) $$f $(SCRIPTSDIR); \ + $(INSTALL) -m $(EXEMODE) $$f $(DESTDIR)$(SCRIPTSDIR); \ done finish: diff -u -r mailman-2.0/cron/Makefile.in mailman-2.0rc3/cron/Makefile.in --- mailman-2.0/cron/Makefile.in Wed Nov 1 10:32:05 2000 +++ mailman-2.0rc3/cron/Makefile.in Fri Nov 24 16:45:57 2000 @@ -59,7 +59,7 @@ install: for f in $(SCRIPTS); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(CRONDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(CRONDIR); \ done finish: diff -u -r mailman-2.0/filters/Makefile.in mailman-2.0rc3/filters/Makefile.in --- mailman-2.0/filters/Makefile.in Fri Sep 22 16:00:01 2000 +++ mailman-2.0rc3/filters/Makefile.in Fri Nov 24 16:46:18 2000 @@ -59,7 +59,7 @@ install: for f in $(FILTERS); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(FILTERSDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(FILTERSDIR); \ done finish: diff -u -r mailman-2.0/misc/Makefile.in mailman-2.0rc3/misc/Makefile.in --- mailman-2.0/misc/Makefile.in Fri Sep 22 15:58:52 2000 +++ mailman-2.0rc3/misc/Makefile.in Fri Nov 24 16:47:20 2000 @@ -61,14 +61,14 @@ all: install: - $(INSTALL) -m $(FILEMODE) Cookie.py $(PACKAGEDIR) - $(INSTALL) -m $(FILEMODE) $(ICONS) $(ICONDIR) + $(INSTALL) -m $(FILEMODE) Cookie.py $(DESTDIR)$(PACKAGEDIR) + $(INSTALL) -m $(FILEMODE) $(ICONS) $(DESTDIR)$(ICONDIR) for d in $(PATHSDIRS); \ do \ - dir=$(prefix)/$$d; \ + dir=$(DESTDIR)$(prefix)/$$d; \ $(INSTALL) -m $(FILEMODE) paths.py $$dir; \ done - $(INSTALL) -m $(DATAMODE) pending_subscriptions.db $(DATADIR) + $(INSTALL) -m $(DATAMODE) pending_subscriptions.db $(DESTDIR)$(DATADIR) finish: diff -u -r mailman-2.0/scripts/Makefile.in mailman-2.0rc3/scripts/Makefile.in --- mailman-2.0/scripts/Makefile.in Tue Mar 21 14:26:37 2000 +++ mailman-2.0rc3/scripts/Makefile.in Fri Nov 24 16:47:35 2000 @@ -58,7 +58,7 @@ install: for f in $(SCRIPTS); \ do \ - $(INSTALL) -m $(FILEMODE) $$f $(SCRIPTSDIR); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(SCRIPTSDIR); \ done finish: diff -u -r mailman-2.0/src/Makefile.in mailman-2.0rc3/src/Makefile.in --- mailman-2.0/src/Makefile.in Sun Aug 6 13:03:00 2000 +++ mailman-2.0rc3/src/Makefile.in Fri Nov 24 16:49:16 2000 @@ -111,18 +111,18 @@ install: all for f in $(CGI_PROGS); \ do \ - exe=$(CGIDIR)/$$f$(CGIEXT); \ + exe=$(DESTDIR)$(CGIDIR)/$$f$(CGIEXT); \ $(INSTALL_PROGRAM) $$f $$exe; \ chmod g+s $$exe; \ done for f in $(MAIL_PROGS); \ do \ - $(INSTALL_PROGRAM) $$f $(MAILDIR); \ - chmod g+s $(MAILDIR)/$$f; \ + $(INSTALL_PROGRAM) $$f $(DESTDIR)$(MAILDIR); \ + chmod g+s $(DESTDIR)$(MAILDIR)/$$f; \ done # @for f in $(ALIAS_PROGS); \ # do \ -# $(INSTALL_PROGRAM) $$f $(bindir) ; \ +# $(INSTALL_PROGRAM) $$f $(DESTDIR)$(bindir) ; \ # done finish: diff -u -r mailman-2.0/templates/Makefile.in mailman-2.0rc3/templates/Makefile.in --- mailman-2.0/templates/Makefile.in Tue Mar 21 14:26:46 2000 +++ mailman-2.0rc3/templates/Makefile.in Fri Nov 24 16:49:53 2000 @@ -59,8 +59,8 @@ install: for f in $(TEMPLATES); \ do \ - mv -f $(TEMPLATEDIR)/$$f $(TEMPLATEDIR)/$$f.prev || $(TRUE); \ - $(INSTALL) -m $(FILEMODE) $$f $(TEMPLATEDIR); \ + mv -f $(DESTDIR)$(TEMPLATEDIR)/$$f $(DESTDIR)$(TEMPLATEDIR)/$$f.prev || $(TRUE); \ + $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(TEMPLATEDIR); \ done finish: Summary: The GNU Mailing List Management System Name: mailman Version: 2.0.2 Release: 1 Copyright: GPL Group: System Environment/Mailing List Managers Source: http://www.list.org/mailman-2.0.2.tgz URL: http://www.list.org Patch0: mailman-rpm.diff BuildRoot: /var/tmp/%{name}-root Packager: Wari Wahab<wari@celestix.com> Requires: python %description Mailman is software to help manage electronic mail discussion lists, much like Majordomo or Smartmail. Mailman gives each mailing list a unique web page and allows users to subscribe, unsubscribe, and change their account options over the web. Even the list manager can administer his or her list entirely via the web. Mailman has most of the features that people want in a mailing list management system, including built-in archiving, mail-to-news gateways, spam filters, bounce detection, digest delivery, and so on. %prep %setup -q %patch0 -p1 find . -type d -exec chmod 755 {} \; %build /usr/sbin/groupadd -g 88 mailman /usr/sbin/useradd -d /var/mailman -g mailman -u 88 mailman chgrp mailman /var/mailman chmod a+rx,g+ws /var/mailman export CFLAGS="$RPM_OPT_FLAGS"; CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/var/mailman --with-mail-gid=mailman make CFLAGS="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/var/mailman chgrp mailman $RPM_BUILD_ROOT/var/mailman chmod a+rx,g+ws $RPM_BUILD_ROOT/var/mailman make DESTDIR=$RPM_BUILD_ROOT install %pre /usr/sbin/groupadd -g 88 mailman /usr/sbin/useradd -d /var/mailman -g mailman -u 88 mailman %post su mailman -c '/usr/bin/crontab /var/mailman/cron/crontab.in' %clean rm -rf $RPM_BUILD_ROOT /usr/sbin/userdel mailman %files %dir /var/mailman /var/mailman/* %changelog * Wed Mar 07 2001 Wari Wahab <wari@celestix.com> - Modified for the latest mailman 2.0.2 * Wed Dec 20 2000 Wari Wahab <wari@celestix.com> - Initial RPM of mailman
participants (1)
-
Wari Wahab