Charles G Waldman writes:
Who has the `.spec' file for building an RPM distribution of XEmacs?
I know we've distributed RPM's in the past.
I have an old one for 21.1.9 kicking around that I modified for
NetWinders (one patch). See the attachment.
Shouldn't it really be part of the xemacs sources, in etc or
somewhere? Like the Windows installer stuff?
Yes! I had to download an entire srpm just to get the spec file.
Sean
# xemacs-21.1.9.spec
%define main 21.1
%define beta 9
ExclusiveArch: i386 sparc alpha armv4l
Summary: The XEmacs editor
Name: xemacs
Version: %{main}.%{beta}
Release: nw1
Copyright: GPL
Group: Applications/Editors
#Distribution: Red Hat Contrib|Net
Vendor: XEmacs
#Packager: Red Hat Contrib|Net <rhcn-bugs(a)redhat.com>
#Packager: Stig Bjørlykke <stigb(a)xemacs.org>
Packager: Sean MacLennan <seanm(a)netwinder.org>
Source0: xemacs-%{main}.%{beta}.tar.gz
Source1: xemacs-%{main}.wmconfig
Source2: xemacs-%{main}-README
Source3: xemacs_16x16.xpm
Source4: xemacs_32x32.xpm
Patch0: xemacs-igs.patch
Url:
http://www.xemacs.org/
Buildroot: /tmp/xemacs-%{PACKAGE_VERSION}
Prefix: /usr
Prefix: /var
Prefix: /etc
# Initially by Stig Bjørlykke <stigb(a)xemacs.org> for i386
# and modified for sparc by Frederic Poncin <fp(a)info.ucl.ac.be>
# Then modified for alpha by stigb.
ExclusiveArch: i386 sparc alpha armv4l
%description
XEmacs is a version of Emacs, compatible with and containing many
improvements over FSF Emacs, written by Richard Stallman of the
Free Software Foundation. It was originally based on an early release
of FSF Emacs Version 19, and has tracked subsequent releases of FSF
Emacs as they have become available.
If you need *all* the packages available for XEmacs %{PACKAGE_VERSION} you can
install the xemacs-packages as well.
If you just want _some_ of the packages, please take a look at
ftp://ftp.xemacs.org/pub/xemacs/packages/ and install them with the
XEmacs utilities.
This XEmacs distribution has been splitted in some rpms:
- xemacs-%{PACKAGE_VERSION} : the main part
- xemacs-el-%{PACKAGE_VERSION} : elisp sources (optional)
- xemacs-extras-%{PACKAGE_VERSION} : files in conflict with ctags/emacs
(Install xemacs-extras if you do not have ctags and emacs installed.)
%package el
Summary: .el source files for XEmacs
Group: Applications/Editors
Requires: xemacs = %{PACKAGE_VERSION}
%description el
.el source files -- not necessary to run XEmacs
%package extras
Summary: files which conflict with ctags and FSF Emacs
Group: Applications/Editors
Requires: xemacs
%description extras
These files are common between ctags, FSF Emacs and XEmacs. If you
do not have ctags and FSF Emacs installed, be sure to install this
package as well when you install XEmacs.
%changelog
* Thu Feb 24 2000 Sean MacLennan <seanm(a)netwinder.org>
- Added support for arm (NetWinder)
* Sat May 15 1999 Stig Bjørlykke <stigb(a)xemacs.org>
- Added changes from José Romildo Malaquias <romildo(a)iceb.ufop.br>:
+ Changed the group to reflect RedHat 6.0.
+ Added icons for xemacs (borrowed from KDE).
+ Used %defattrib in file lists and removed %attr on individual files.
+ Added Prefix tags so the packages are relocatable (rpm >= 3.0 ?).
- Tweaked the version handling some more.
- Build for 21.1.2, repackaged the tar file and removed a unused softlink.
* Thu Mar 25 1998 Stig Bjorlykke <stigb(a)xemacs.org>
- Build for 21.0 (beta 67).
- Removed RELEASE_REQUIRE, and changed some version strings.
(Idea from Alexander Skwar <ASkwar(a)DigitalProjects.com>)
- Removed static package.
* Wed Mar 4 1998 Stig Bjorlykke <stigb(a)tihlde.hist.no>
- Build for alpha.
* Wed Feb 25 1998 Stig Bjorlykke <stigb(a)tihlde.hist.no>
- Added "%RELEASE_REQUIRE".
- Build for 20.4.
* Thu Jan 15 1998 Stig Bjorlykke <stigb(a)tihlde.hist.no>
- Added new changelog.
- Rewrote the specfile and removed the old changelog.
%prep
%setup -q -T -b 0 -n xemacs-%{main}.%{beta}
%ifarch armv4l
%patch0 -p1
%endif
%build
%ifarch i386
%define HOSTTYPE i386-pc-linux
%define SOUND --with-sound=native
%endif
%ifarch sparc
%define HOSTTYPE sparc-unknown-linux
%endif
%ifarch alpha
%define HOSTTYPE alpha-pc-linux
%endif
%ifarch armv4l
%define HOSTTYPE arm-unknown-linux
%endif
# Delete the originals for the patched files
#find . -name "*.orig" -exec rm {} \;
./configure %{HOSTTYPE} --prefix=/usr --with-dialogs=athena \
--cflags="$RPM_OPT_FLAGS" --lockdir=/var/lock/xemacs \
--with-pop %{SOUND}
make dist
%install
[ "x$RPM_BUILD_ROOT" != "x/" ] && rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT/usr install-arch-dep
make prefix=$RPM_BUILD_ROOT/usr install-arch-indep
make prefix=$RPM_BUILD_ROOT/usr gzip-el
cp $RPM_SOURCE_DIR/xemacs-%{main}-README README
mkdir -p -m 0777 $RPM_BUILD_ROOT/var/lock/xemacs
mkdir -p -m 0755 $RPM_BUILD_ROOT/usr/lib/xemacs
# Build file listings. (and make movemail setgid mail on RHL)
DIR="$RPM_BUILD_ROOT/usr/lib/xemacs-%{main}.%{beta}"
EL="*.el.gz"
find $DIR -type d | sed -e "s#^$RPM_BUILD_ROOT#%dir #" > rpm-files
find $DIR -name $EL -type f | sed -e "s#^$RPM_BUILD_ROOT##" > rpm-el-files
find $DIR -not -name $EL -type f | sed -e "s#^$RPM_BUILD_ROOT##
s#^$RPM_BUILD_ROOT\(.*movemail\)#%attr(2755, root, mail) \1#" >> rpm-files
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/X11/wmconfig \
$RPM_BUILD_ROOT/usr/share/icons/mini
cp $RPM_SOURCE_DIR/xemacs-%{main}.wmconfig \
$RPM_BUILD_ROOT/etc/X11/wmconfig/xemacs
cp $RPM_SOURCE_DIR/xemacs_16x16.xpm $RPM_BUILD_ROOT/usr/share/icons/mini
cp $RPM_SOURCE_DIR/xemacs_32x32.xpm $RPM_BUILD_ROOT/usr/share/icons
%clean
[ "x$RPM_BUILD_ROOT" != "x/" ] && rm -rf $RPM_BUILD_ROOT
%files -f rpm-files
%defattr (-, root, root, 755)
%doc INSTALL README COPYING GETTING.GNU.SOFTWARE PROBLEMS etc/NEWS
%doc etc/MAILINGLISTS BUGS README Installation
/usr/bin/xemacs
/usr/bin/xemacs-%{main}.%{beta}
# SAM /usr/bin/pstogif
/usr/bin/gnuclient
/usr/bin/gnuattach
/usr/bin/gnudoit
/usr/man/man1/xemacs.1
/usr/man/man1/gnuserv.1
/usr/man/man1/gnuclient.1
/usr/man/man1/gnuattach.1
/usr/man/man1/gnudoit.1
/usr/share/icons/xemacs_32x32.xpm
/usr/share/icons/mini/xemacs_16x16.xpm
%config /etc/X11/wmconfig/xemacs
%dir /var/lock/xemacs
%dir /usr/lib/xemacs
%files el -f rpm-el-files
%defattr (-, root, root, 755)
%files extras
%defattr (-, root, root, 755)
/usr/bin/b2m
/usr/bin/ctags
/usr/bin/etags
/usr/bin/rcs-checkin
/usr/man/man1/ctags.1
/usr/man/man1/etags.1
# EOF
--