2008-05-02 River Tarnell <
[email protected]>
* SFEtinyfugue.spec: New spec.
* patches/tinyfugue-01-installprefix.diff: Edit makefile to allow
installation into $RPM_BUILD_ROOT.
* patches/tinyfugue-02-remove-inline.diff: Remove the 'inline' keyword
from a function to make Studio happy.
--- a/ChangeLog Fri May 02 02:26:49 2008 +0000
+++ b/ChangeLog Fri May 02 19:26:56 2008 +0000
@@ -1,3 +1,11 @@
+2008-05-02 River Tarnell <[email protected]>
+
+ * SFEtinyfugue.spec: New spec.
+ * patches/tinyfugue-01-installprefix.diff: Edit makefile to allow
+ installation into $RPM_BUILD_ROOT.
+ * patches/tinyfugue-02-remove-inline.diff: Remove the 'inline' keyword
+ from a function to make Studio happy.
+
2008-05-02 River Tarnell <[email protected]>
* SFEnrg2iso.spec: New spec.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEtinyfugue.spec Fri May 02 19:26:56 2008 +0000
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2006 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+
+%include Solaris.inc
+
+Name: SFEtinyfugue
+Summary: Flexible, screen-oriented MUD client
+Version: 5.0b8
+Source: http://surfnet.dl.sourceforge.net/sourceforge/tinyfugue/tf-50b8.tar.gz
+Patch1: tinyfugue-01-installprefix.diff
+Patch2: tinyfugue-02-remove-inline.diff
+
+SUNW_BaseDir: %{_basedir}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+
+%prep
+%setup -q -n tf-50b8
+%patch1 -p0
+%patch2 -p0
+
+%build
+
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+ CPUS=1
+fi
+
+export CFLAGS="%optflags"
+export LDFLAGS="%{_ldflags} -R/usr/sfw/lib -L%{_libdir} -R%{_libdir}"
+export CPPFLAGS="-I/usr/sfw/include -I%{_includedir}"
+
+./configure --prefix=%{_prefix} \
+ --mandir=%{_mandir} \
+ --sysconfdir=%{_sysconfdir}
+
+make -j$CPUS
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT/%{_bindir}
+mkdir -p $RPM_BUILD_ROOT/%{_datadir}
+make install IP=$RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
+cp src/tf.1.nroffman $RPM_BUILD_ROOT/%{_mandir}/man1/tf.1
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/*
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr (0755, root, sys) %{_datadir}/tf-lib
+%{_datadir}/tf-lib/*
+%dir %attr (0755, root, bin) %{_mandir}
+%dir %attr (0755, root, bin) %{_mandir}/man1
+%{_mandir}/man1/*.1
+
+%changelog
+* Tue May 2 2008 - [email protected]
+- Initial spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/tinyfugue-01-installprefix.diff Fri May 02 19:26:56 2008 +0000
@@ -0,0 +1,81 @@
+--- Makefile.in.old Fri May 2 20:10:28 2008
++++ Makefile.in Fri May 2 20:10:13 2008
+@@ -15,7 +15,7 @@
+ default: files
+
+ files all install tf clean uninstall: _force_
+- @cd src; PATH=${LONGPATH} ${MAKE} $@
++ @cd src; PATH=${LONGPATH} ${MAKE} IP=$(IP) $@
+
+ _force_:
+
+--- unix/unix.mak.old Fri May 2 20:06:42 2008
++++ unix/unix.mak Fri May 2 20:11:21 2008
+@@ -87,13 +87,13 @@
+ -test -z "$(STRIP)" || $(STRIP) tf$(X) || true
+
+ PREFIXDIRS:
+- test -d "$(bindir)" || mkdir $(bindir)
+- test -d "$(datadir)" || mkdir $(datadir)
++ test -d "$(IP)$(bindir)" || mkdir $(IP)$(bindir)
++ test -d "$(IP)$(datadir)" || mkdir $(IP)$(datadir)
+
+ install_TF $(TF): tf$(X) $(BUILDERS)
+- -@rm -f $(TF)
+- cp tf$(X) $(TF)
+- chmod $(MODE) $(TF)
++ -@rm -f $(IP)$(TF)
++ cp tf$(X) $(IP)$(TF)
++ chmod $(MODE) $(IP)$(TF)
+
+ SYMLINK $(SYMLINK): $(TF)
+ test -z "$(SYMLINK)" || { rm -f $(SYMLINK) && ln -s $(TF) $(SYMLINK); }
+@@ -101,32 +101,32 @@
+ LIBRARY $(TF_LIBDIR): ../tf-lib/tf-help ../tf-lib/tf-help.idx
+ @echo '## Creating library directory...'
+ # @# Overly simplified shell commands, to avoid problems on ultrix
+- -@test -n "$(TF_LIBDIR)" || echo "TF_LIBDIR is undefined."
+- test -n "$(TF_LIBDIR)"
+- test -d "$(TF_LIBDIR)" || mkdir $(TF_LIBDIR)
+- -@test -d "$(TF_LIBDIR)" || echo "Can't make $(TF_LIBDIR) directory. See if"
+- -@test -d "$(TF_LIBDIR)" || echo "there is already a file with that name."
+- test -d "$(TF_LIBDIR)"
++ -@test -n "$(IP)$(TF_LIBDIR)" || echo "TF_LIBDIR is undefined."
++ test -n "$(IP)$(TF_LIBDIR)"
++ test -d "$(IP)$(TF_LIBDIR)" || mkdir $(IP)$(TF_LIBDIR)
++ -@test -d "$(IP)$(TF_LIBDIR)" || echo "Can't make $(TF_LIBDIR) directory. See if"
++ -@test -d "$(IP)$(TF_LIBDIR)" || echo "there is already a file with that name."
++ test -d "$(IP)$(TF_LIBDIR)"
+ #
+ # @#rm -f $(TF_LIBDIR)/*; # wrong: this would remove local.tf, etc.
+ @echo '## Copying library files...'
+ cd ../tf-lib; \
+ for f in *; do test -f $$f && files="$$files $$f"; done; \
+- ( cd $(TF_LIBDIR); rm -f $$files tf.help tf.help.index; ); \
+- cp $$files $(TF_LIBDIR); \
+- cd $(TF_LIBDIR); \
++ ( cd $(IP)$(TF_LIBDIR); rm -f $$files tf.help tf.help.index; ); \
++ cp $$files $(IP)$(TF_LIBDIR); \
++ cd $(IP)$(TF_LIBDIR); \
+ chmod $(MODE) $$files; chmod ugo-wx $$files
+- -rm -f $(TF_LIBDIR)/CHANGES
+- cp ../CHANGES $(TF_LIBDIR)
+- chmod $(MODE) $(TF_LIBDIR)/CHANGES; chmod ugo-wx $(TF_LIBDIR)/CHANGES
+- chmod $(MODE) $(TF_LIBDIR)
+- -@cd $(TF_LIBDIR); old=`ls replace.tf 2>/dev/null`; \
++ -rm -f $(IP)$(TF_LIBDIR)/CHANGES
++ cp ../CHANGES $(IP)$(TF_LIBDIR)
++ chmod $(MODE) $(IP)$(TF_LIBDIR)/CHANGES; chmod ugo-wx $(IP)$(TF_LIBDIR)/CHANGES
++ chmod $(MODE) $(IP)$(TF_LIBDIR)
++ -@cd $(IP)$(TF_LIBDIR); old=`ls replace.tf 2>/dev/null`; \
+ if [ -n "$$old" ]; then \
+- echo "## WARNING: Obsolete files found in $(TF_LIBDIR): $$old"; \
++ echo "## WARNING: Obsolete files found in $(IP)$(TF_LIBDIR): $$old"; \
+ fi
+ @echo '## Creating links so old library names still work...'
+ # @# note: ln -sf isn't portable.
+- @cd $(TF_LIBDIR); \
++ @cd $(IP)$(TF_LIBDIR); \
+ rm -f bind-bash.tf; ln -s kb-bash.tf bind-bash.tf; \
+ rm -f bind-emacs.tf; ln -s kb-emacs.tf bind-emacs.tf; \
+ rm -f completion.tf; ln -s complete.tf completion.tf; \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/tinyfugue-02-remove-inline.diff Fri May 02 19:26:56 2008 +0000
@@ -0,0 +1,11 @@
+--- src/variable.c.old Fri May 2 20:02:58 2008
++++ src/variable.c Fri May 2 20:03:22 2008
+@@ -106,7 +106,7 @@
+ Pattern looks_like_special_sub; /* looks like a special substitution */
+ Pattern looks_like_special_sub_ic; /* same, ignoring case */
+
+-inline Var *newglobalvar(const char *name)
++Var *newglobalvar(const char *name)
+ {
+ Var *var;
+ var = newvar(name);