More packaging fun (games package to "advertise" FLTK...)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4755 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2006-01-15 18:02:44 +00:00
parent 464c2f4a5e
commit 61b86ce0e5
16 changed files with 177 additions and 44 deletions

View File

@@ -47,6 +47,7 @@ install: makeinclude
install-desktop: makeinclude install-desktop: makeinclude
cd fluid; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP) cd fluid; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP)
cd test; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP)
uninstall: makeinclude uninstall: makeinclude
$(RM) $(DESTDIR)$(bindir)/fltk-config $(RM) $(DESTDIR)$(bindir)/fltk-config
@@ -57,6 +58,7 @@ uninstall: makeinclude
uninstall-desktop: makeinclude uninstall-desktop: makeinclude
cd fluid; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP) cd fluid; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP)
cd test; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP)
depend: makeinclude depend: makeinclude
for dir in $(DIRS); do\ for dir in $(DIRS); do\

View File

@@ -37,13 +37,11 @@ dnl FLTK library versions...
FL_MAJOR_VERSION=1 FL_MAJOR_VERSION=1
FL_MINOR_VERSION=1 FL_MINOR_VERSION=1
FL_PATCH_VERSION=7 FL_PATCH_VERSION=7
FL_RELEASE_VERSION=
FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION} FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
AC_SUBST(FL_MAJOR_VERSION) AC_SUBST(FL_MAJOR_VERSION)
AC_SUBST(FL_MINOR_VERSION) AC_SUBST(FL_MINOR_VERSION)
AC_SUBST(FL_PATCH_VERSION) AC_SUBST(FL_PATCH_VERSION)
AC_SUBST(FL_RELEASE_VERSION)
AC_SUBST(FL_API_VERSION) AC_SUBST(FL_API_VERSION)
dnl Get the operating system and version number... dnl Get the operating system and version number...

View File

@@ -32,7 +32,7 @@
%vendor FLTK Development Team %vendor FLTK Development Team
%license COPYING %license COPYING
%readme README %readme README
%version @FL_MAJOR_VERSION@.@FL_MINOR_VERSION@.@FL_PATCH_VERSION@@FL_RELEASE_VERSION@ %version @FL_MAJOR_VERSION@.@FL_MINOR_VERSION@.@FL_PATCH_VERSION@
%description << EOF %description << EOF
The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a
cross-platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11), cross-platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11),

View File

@@ -25,8 +25,8 @@
# http://www.fltk.org/str.php # http://www.fltk.org/str.php
# #
%define version 1.1.7 %define version @VERSION@
%define release 0 %define release @RELEASE@
%define prefix /usr %define prefix /usr
Summary: Fast Light Tool Kit (FLTK) Summary: Fast Light Tool Kit (FLTK)
@@ -36,8 +36,8 @@ Release: %{release}
License: LGPL License: LGPL
Group: System Environment/Libraries Group: System Environment/Libraries
Source: ftp://ftp.fltk.org/pub/fltk/%{version}/fltk-%{version}-source.tar.gz Source: ftp://ftp.fltk.org/pub/fltk/%{version}/fltk-%{version}-source.tar.gz
URL: http://www.fltk.org URL: http://www.fltk.org/
Packager: Michael Sweet <mike@easysw.com> Packager: FLTK Developer <fltk@fltk.org>
# use BuildRoot so as not to disturb the version already installed # use BuildRoot so as not to disturb the version already installed
BuildRoot: /var/tmp/fltk-%{PACKAGE_VERSION} BuildRoot: /var/tmp/fltk-%{PACKAGE_VERSION}
@@ -57,6 +57,13 @@ Install fltk-devel if you need to develop FLTK applications.
You'll need to install the fltk package if you plan to run You'll need to install the fltk package if you plan to run
dynamically linked applications. dynamically linked applications.
%package games
Summary: FLTK Games
Group: Games
%description games
Install fltk-games to play checkers or Sudoku on your computer.
%prep %prep
%setup %setup
@@ -85,7 +92,8 @@ rm -rf $RPM_BUILD_ROOT
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{prefix}/bin %dir %{prefix}/bin
%{prefix}/bin/* %{prefix}/bin/fltk-config
%{prefix}/bin/fluid
%dir %{prefix}/include/FL %dir %{prefix}/include/FL
%{prefix}/include/FL/* %{prefix}/include/FL/*
%{prefix}/include/Fl %{prefix}/include/Fl
@@ -96,10 +104,18 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/* %{_mandir}/*
%dir %{prefix}/share/doc/fltk %dir %{prefix}/share/doc/fltk
%{prefix}/share/doc/fltk/* %{prefix}/share/doc/fltk/*
%{prefix}/share/applnk/* %{prefix}/share/applnk/Development/*
%{prefix}/share/icons/* %{prefix}/share/icons/hicolor/*/apps/fluid.png
%{prefix}/share/mimelnk/* %{prefix}/share/mimelnk/*
%files games
%dir %{prefix}/bin
%{prefix}/bin/checkers
%{prefix}/bin/sudoku
%{prefix}/share/applnk/Games/*
%{prefix}/share/icons/hicolor/*/apps/checkers.png
%{prefix}/share/icons/hicolor/*/apps/sudoku.png
# #
# End of "$Id$". # End of "$Id$".
# #

View File

@@ -88,7 +88,9 @@ install-linux:
-$(MKDIR) $(DESTDIR)/usr/share/applnk/Development -$(MKDIR) $(DESTDIR)/usr/share/applnk/Development
$(CP) fluid.desktop $(DESTDIR)/usr/share/applnk/Development $(CP) fluid.desktop $(DESTDIR)/usr/share/applnk/Development
for size in 16 32 48 64 128; do \ for size in 16 32 48 64 128; do \
-$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \ if test ! -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; then \
$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
fi; \
$(CP) icons/fluid-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/fluid.png; \ $(CP) icons/fluid-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/fluid.png; \
done done
-$(MKDIR) $(DESTDIR)/usr/share/mimelnk/application -$(MKDIR) $(DESTDIR)/usr/share/mimelnk/application

View File

@@ -5,40 +5,43 @@
echo "Getting distribution..." echo "Getting distribution..."
CVS_RSH=ssh; export CVS_RSH if test $# = 0 -o "x$1" = xsnapshot; then
MAINTAINER=easysw echo Updating for snapshot...
svn up
cd /tmp rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
cvs -q -d$MAINTAINER@cvs.sourceforge.net:/cvsroot/fltk get -P -r v1_1 fltk version="1.1svn"
fileversion="1.1svn-r$rev"
if test $# = 0; then fileurl="ftp://ftp.easysw.com/pub/fltk/snapshots/fltk-$fileversion-source.tar.bz2"
echo -n "Version number for distribution? " url="."
read version
else else
echo Creating tag for release...
rev="1"
version=$1 version=$1
fileversion=$1
fileurl="ftp://ftp.easysw.com/pub/fltk/$version/fltk-$fileversion-source.tar.bz2"
url="https://svn.easysw.com/public/fltk/fltk/tags/release-$version"
svn copy https://svn.easysw.com/public/fltk/fltk/branches/branch-1.1 "$url" \
-m "Tag $version" || exit 1
fi fi
rm -rf fltk-$version echo Exporting $version...
mv fltk fltk-$version rm -rf /tmp/fltk-$version
cd fltk-$version svn export $url /tmp/fltk-$version
if test x$version != xsnapshot; then echo Applying version number...
echo "Tagging release..." cd /tmp/fltk-$version
tag=`echo v$version | tr '.' '_'` fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
sed -e '1,$s/@VERSION@/'$version'/' \
-e '1,$s/@RELEASE@/'$rev'/' \
-e '1,$s/^Source:.*/Source: '$fileurl'/' \
<fltk.spec.in >fltk.spec
cvs tag -F $tag echo Creating configure script...
fi autoconf -f
echo "Making configuration script..."
autoconf
echo "Removing CVS directories..."
find . -name .cvsignore -exec rm -f '{}' \;
find . -name CVS -exec rm -rf '{}' \;
echo Cleaning developer files...
rm -rf OpenGL autom4te* bc5 config forms gl glut images packages themes rm -rf OpenGL autom4te* bc5 config forms gl glut images packages themes
rm -f makesrcdist rm -f makesrcdist
@@ -46,15 +49,15 @@ cd ..
echo "Making UNIX distribution..." echo "Making UNIX distribution..."
gtar czf fltk-$version-source.tar.gz fltk-$version gtar czf fltk-$fileversion-source.tar.gz fltk-$version
echo "Making BZ2 distribution..." echo "Making BZ2 distribution..."
gunzip -c fltk-$version-source.tar.gz | bzip2 -v9 >fltk-$version-source.tar.bz2 gtar cjf fltk-$fileversion-source.tar.bz2 fltk-$version
echo "Making Windows distribution..." echo "Making Windows distribution..."
rm -f fltk-$version-source.zip rm -f fltk-$fileversion-source.zip
zip -r9 fltk-$version-source.zip fltk-$version zip -r9 fltk-$fileversion-source.zip fltk-$version
echo "Removing distribution directory..." echo "Removing distribution directory..."

View File

@@ -3,7 +3,7 @@
# #
# Test/example program makefile for the Fast Light Tool Kit (FLTK). # Test/example program makefile for the Fast Light Tool Kit (FLTK).
# #
# Copyright 1998-2005 by Bill Spitzak and others. # Copyright 1998-2006 by Bill Spitzak and others.
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public # modify it under the terms of the GNU Library General Public
@@ -180,10 +180,53 @@ install:
$(CP) *.h *.cxx *.fl demo.menu *.xbm *.xpm $(DESTDIR)$(docdir)/examples $(CP) *.h *.cxx *.fl demo.menu *.xbm *.xpm $(DESTDIR)$(docdir)/examples
$(CHMOD) 644 $(DESTDIR)$(docdir)/examples/*.* $(CHMOD) 644 $(DESTDIR)$(docdir)/examples/*.*
install-linux:
echo Installing games to $(DESTDIR)$(bindir)...
-$(MKDIR) $(DESTDIR)$(bindir)
-$(MKDIR) $(DESTDIR)/usr/share/applnk/Games
-$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/32x32/apps; \
-$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/128x128/apps; \
for game in checkers sudoku; do \
$(CP) $$game $(DESTDIR)$(bindir); \
$(CHMOD) 755 $(DESTDIR)$(bindir)/$$game; \
$(CP) $$game.desktop $(DESTDIR)/usr/share/applnk/Games; \
$(CP) icons/$$game-32.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/$$game.png; \
$(CP) icons/$$game-128.png $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/$$game.png; \
done
install-osx:
echo Installing games in $(DESTDIR)/Applications...
for game in checkers sudoku; do \
if test ! -d $(DESTDIR)/Applications/$$game.app; then \
$(MKDIR) $(DESTDIR)/Applications/$$game.app; \
$(MKDIR) $(DESTDIR)/Applications/$$game.app/Contents; \
$(MKDIR) $(DESTDIR)/Applications/$$game.app/Contents/MacOS; \
$(MKDIR) $(DESTDIR)/Applications/$$game.app/Contents/Resources; \
fi; \
$(CP) $$game.app/Contents/Info.plist $(DESTDIR)/Applications/$$game.app/Contents; \
$(CP) $$game.app/Contents/PkgInfo $(DESTDIR)/Applications/$$game.app/Contents; \
$(CP) $$game.app/Contents/MacOS/$$game $(DESTDIR)/Applications/$$game.app/Contents/MacOS; \
$(CP) $$game.app/Contents/Resources/$$game.icns $(DESTDIR)/Applications/$$game.app/Contents/Resources; \
done
uninstall: uninstall:
echo "Removing examples programs from $(DESTDIR)$(docdir)/examples..." echo "Removing examples programs from $(DESTDIR)$(docdir)/examples..."
-$(RMDIR) $(DESTDIR)$(docdir)/examples -$(RMDIR) $(DESTDIR)$(docdir)/examples
uninstall-linux:
echo Removing games from $(DESTDIR)$(bindir)...
for game in checkers sudoku; do \
$(RM) $(DESTDIR)$(bindir)/$$game; \
$(RM) $(DESTDIR)/usr/share/applnk/Games/$$game.desktop; \
$(RM) $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/$$game.png; \
$(RM) $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/$$game.png; \
done
uninstall-osx:
echo Removing games from $(DESTDIR)/Applications...
$(RM) -r $(DESTDIR)/Applications/checkers.app
$(RM) -r $(DESTDIR)/Applications/sudoku.app
# FLUID file rules # FLUID file rules
.fl.cxx .fl.h: ../fluid/fluid$(EXEEXT) .fl.cxx .fl.h: ../fluid/fluid$(EXEEXT)
echo Generating $<... echo Generating $<...
@@ -212,6 +255,10 @@ button$(EXEEXT): button.o
buttons$(EXEEXT): buttons.o buttons$(EXEEXT): buttons.o
checkers$(EXEEXT): checkers.o checkers$(EXEEXT): checkers.o
echo Linking $@...
$(CXX) $(CXXFLAGS) checkers.o -o $@ $(LINKFLTK) $(LDLIBS)
$(CP) checkers$(EXEEXT) checkers.app/Contents/MacOS
$(POSTBUILD) $@ ../FL/mac.r
clock$(EXEEXT): clock.o clock$(EXEEXT): clock.o

BIN
test/checkers-128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
test/checkers-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="0.9">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>checkers</string>
<key>CFBundleIdentifier</key>
<string>org.fltk.checkers</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 1997-2006 by Bill Spitzak and others</string>
<key>CFAppleHelpAnchor</key>
<string>help</string>
<key>CFBundleName</key>
<string>checkers</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>FLSU</string>
<key>CFBundleIconFile</key>
<string>checkers.icns</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleGetInfoString</key>
<string>1.0, Copyright 1997-2006 by Bill Spitzak and others</string>
</dict>
</plist>

View File

@@ -0,0 +1 @@
FLSUFlsu

10
test/checkers.desktop Normal file
View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Name=checkers
Comment=Checkers Game
TryExec=checkers
Exec=checkers
Icon=checkers
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Games

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
test/sudoku-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

View File

@@ -17,7 +17,7 @@
<string>English</string> <string>English</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright 2005 by Michael Sweet</string> <string>Copyright 2005-2006 by Michael Sweet</string>
<key>CFAppleHelpAnchor</key> <key>CFAppleHelpAnchor</key>
<string>help</string> <string>help</string>
@@ -38,7 +38,7 @@
<string>1.0</string> <string>1.0</string>
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>1.0, Copyright 2005 by Michael Sweet</string> <string>1.0, Copyright 2005-2006 by Michael Sweet</string>
</dict> </dict>
</plist> </plist>

10
test/sudoku.desktop Normal file
View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Name=sudoku
Comment=Suduku Number Game
TryExec=sudoku
Exec=sudoku
Icon=sudoku
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Games