Work on Linux and OSX desktop integration stuff via make install and

packaging via EPM.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4750 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2006-01-15 03:16:09 +00:00
parent 93e158df5f
commit 887a458227
8 changed files with 93 additions and 13 deletions

View File

@ -5,7 +5,7 @@ dnl "$Id$"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
dnl Copyright 1998-2005 by Bill Spitzak and others.
dnl Copyright 1998-2006 by Bill Spitzak and others.
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
@ -37,7 +37,7 @@ dnl FLTK library versions...
FL_MAJOR_VERSION=1
FL_MINOR_VERSION=1
FL_PATCH_VERSION=7
FL_RELEASE_VERSION=cvs
FL_RELEASE_VERSION=
FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
AC_SUBST(FL_MAJOR_VERSION)
@ -558,6 +558,9 @@ THREADS=
AC_ARG_WITH(links, [ --with-links make header links for common misspellings])
INSTALL_DESKTOP=""
UNINSTALL_DESKTOP=""
case $uname in
CYGWIN* | MINGW*)
dnl Cygwin environment...
@ -622,6 +625,10 @@ case $uname in
# Add a postbuild step after linking applications
POSTBUILD="/Developer/Tools/Rez -t APPL -o"
# Install/Uninstall FLUID application
INSTALL_DESKTOP="install-osx"
UNINSTALL_DESKTOP="uninstall-osx"
;;
*)
@ -735,6 +742,10 @@ case $uname in
if test "x$with_links" = xno; then
HLINKS="#"
fi
# Install/Uninstall FLUID application support files
INSTALL_DESKTOP="install-linux"
UNINSTALL_DESKTOP="uninstall-linux"
;;
esac
@ -744,6 +755,9 @@ AC_SUBST(HLINKS)
AC_SUBST(POSTBUILD)
AC_SUBST(THREADS)
AC_SUBST(INSTALL_DESKTOP)
AC_SUBST(UNINSTALL_DESKTOP)
dnl Figure out the appropriate formatted man page extension...
case "$uname" in
*BSD* | Darwin*)

View File

@ -5,7 +5,7 @@
#
# (EPM can be found at http://www.easysw.com/epm/)
#
# 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
# modify it under the terms of the GNU Library General Public
@ -28,7 +28,7 @@
#
%product Fast Light Tool Kit (FLTK)
%copyright 1998-2005 by Bill Spitzak and others.
%copyright 1998-2006 by Bill Spitzak and others.
%vendor FLTK Development Team
%license COPYING
%readme README
@ -48,7 +48,7 @@ $datadir=@datadir@
$includedir=@includedir@
$libdir=@libdir@
$mandir=@mandir@
$docdir=@docdir@
$docdir=$(datadir)/doc/fltk
$CAT1EXT=@CAT1EXT@
$CAT3EXT=@CAT3EXT@
@ -124,9 +124,19 @@ f 0444 root sys /Applications/fluid.app/PkgInfo fluid/fluid.info
d 0555 root sys /Applications/fluid.app/Contents/MacOS -
l 0555 root sys /Applications/fluid.app/Contents/MacOS/fluid $bindir/fluid
d 0555 root sys /Applications/fluid.app/Contents/Resources -
f 0444 root sys /Applications/fluid.app/Contents/Resources/fluid.icns fluid/fluid.icns
f 0444 root sys /Applications/fluid.app/Contents/Resources/fluid.icns fluid/icons/fluid.icns
%postinstall $bindir/fltk-config --post $bindir/fluid
%postremove /bin/rm -rf /Applications/fluid.app
%system linux
f 0444 root sys /usr/share/applnk/Development/fluid.desktop fluid/fluid.desktop
f 0444 root sys /usr/share/icons/hicolor/16x16/fluid.png fluid/icons/fluid-16.png
f 0444 root sys /usr/share/icons/hicolor/32x32/fluid.png fluid/icons/fluid-32.png
f 0444 root sys /usr/share/icons/hicolor/48x48/fluid.png fluid/icons/fluid-48.png
f 0444 root sys /usr/share/icons/hicolor/64x64/fluid.png fluid/icons/fluid-64.png
f 0444 root sys /usr/share/icons/hicolor/128x128/fluid.png fluid/icons/fluid-128.png
f 0444 root sys /usr/share/mimelnk/application/x-fluid.desktop fluid/x-fluid.desktop
%system all
# FLUID
@ -232,6 +242,7 @@ l 0000 root sys $includedir/FL/Fl_Image.h Fl_Image.H
l 0000 root sys $includedir/FL/Fl_JPEG_Image.h Fl_JPEG_Image.H
l 0000 root sys $includedir/FL/Fl_Input.h Fl_Input.H
l 0000 root sys $includedir/FL/Fl_Input_.h Fl_Input_.H
l 0000 root sys $includedir/FL/Fl_Input_Choice.h Fl_Input_Choice.H
l 0000 root sys $includedir/FL/Fl_Int_Input.h Fl_Int_Input.H
l 0000 root sys $includedir/FL/Fl_Light_Button.h Fl_Light_Button.H
l 0000 root sys $includedir/FL/Fl_Line_Dial.h Fl_Line_Dial.H
@ -270,6 +281,7 @@ l 0000 root sys $includedir/FL/Fl_Select_Browser.h Fl_Select_Browser.H
l 0000 root sys $includedir/FL/Fl_Simple_Counter.h Fl_Simple_Counter.H
l 0000 root sys $includedir/FL/Fl_Single_Window.h Fl_Single_Window.H
l 0000 root sys $includedir/FL/Fl_Slider.h Fl_Slider.H
l 0000 root sys $includedir/FL/Fl_Spinner.h Fl_Spinner.H
l 0000 root sys $includedir/FL/Fl_Tabs.h Fl_Tabs.H
l 0000 root sys $includedir/FL/Fl_Tile.h Fl_Tile.H
l 0000 root sys $includedir/FL/Fl_Timer.h Fl_Timer.H

View File

@ -3,7 +3,7 @@
#
# RPM spec file for 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
# modify it under the terms of the GNU Library General Public
@ -33,7 +33,7 @@ Summary: Fast Light Tool Kit (FLTK)
Name: fltk
Version: %{version}
Release: %{release}
Copyright: LGPL
License: LGPL
Group: System Environment/Libraries
Source: ftp://ftp.fltk.org/pub/fltk/%{version}/fltk-%{version}-source.tar.gz
URL: http://www.fltk.org
@ -96,6 +96,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*
%dir %{prefix}/share/doc/fltk
%{prefix}/share/doc/fltk/*
%{prefix}/share/applnk/*
%{prefix}/share/icons/*
%{prefix}/share/mimelnk/*
#
# End of "$Id$".

View File

@ -76,7 +76,7 @@ depend: $(CPPFILES)
# Automatically generated dependencies...
include makedepend
install: all
install: all $(INSTALL_DESKTOP)
echo "Installing FLUID in $(DESTDIR)$(bindir)..."
-$(MKDIR) $(DESTDIR)$(bindir)
$(CP) $(FLUID) $(DESTDIR)$(bindir)/fluid$(EXEEXT)
@ -84,9 +84,38 @@ install: all
$(DESTDIR)$(bindir)/fltk-config --post $(DESTDIR)$(bindir)/fluid$(EXEEXT)
$(CHMOD) 755 $(DESTDIR)$(bindir)/fluid$(EXEEXT)
uninstall:
install-linux:
-$(MKDIR) $(DESTDIR)/usr/share/applnk/Development
$(CP) fluid.desktop $(DESTDIR)/usr/share/applnk/Development
for size in 16 32 48 64 128; do \
-$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}; \
$(CP) icons/fluid-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/fluid.png; \
done
-$(MKDIR) $(DESTDIR)/usr/share/mimelnk/application
$(CP) x-fluid.desktop $(DESTDIR)/usr/share/mimelnk/application
install-osx:
-$(MKDIR) $(DESTDIR)/Applications/fluid.app
$(CP) fluid.plist $(DESTDIR)/Applications/fluid.app/Info.plist
$(CP) fluid.info $(DESTDIR)/Applications/fluid.app/PkgInfo
-$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents
-$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents/MacOS
$(LN) $(bindir)/fluid $(DESTDIR)/Application/fluid.app/Contents/MacOS/fluid
-$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents/Resources
$(CP) icons/fluid.icns $(DESTDIR)/Applications/fluid.app/Contents/Resources
uninstall: $(UNINSTALL_DESKTOP)
$(RM) $(DESTDIR)$(bindir)/fluid$(EXEEXT)
uninstall-linux:
$(RM) $(DESTDIR)/usr/share/applnk/Development/fluid.desktop
$(RM) $(DESTDIR)/usr/share/icons/hicolor/*/fluid.png
$(RM) $(DESTDIR)/usr/share/mimelnk/application/x-fluid.desktop
uninstall-osx:
$(RM) -r $(DESTDIR)/Applications/fluid.app
#
# Note: The rebuild target can only be used if you have the original .fl
# files. This is normally only used by the FLTK maintainers...

10
fluid/fluid.desktop Normal file
View File

@ -0,0 +1,10 @@
[Desktop Entry]
Name=fluid
Comment=FLTK GUI Designer
TryExec=fluid
Exec=fluid
Icon=fluid
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Development

View File

@ -17,7 +17,7 @@
<string>English</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 1998-2005 by Bill Spitzak and others</string>
<string>Copyright 1998-2006 by Bill Spitzak and others</string>
<key>CFAppleHelpAnchor</key>
<string>help</string>
@ -38,7 +38,7 @@
<string>1.1.7</string>
<key>CFBundleGetInfoString</key>
<string>1.1.7, Copyright 1998-2005 by Bill Spitzak and others</string>
<string>1.1.7, Copyright 1998-2006 by Bill Spitzak and others</string>
<key>CFBundleDocumentTypes</key>
<array>

8
fluid/x-fluid.desktop Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Type=MimeType
MimeType=application/x-fluid
Icon=fluid.png
Patterns=*.fl
Name=FLUID
Comment=FLUID GUI Design
Encoding=UTF-8

View File

@ -3,7 +3,7 @@
#
# Make include file 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
# modify it under the terms of the GNU Library General Public
@ -105,6 +105,10 @@ POSTBUILD = @POSTBUILD@
CAT1EXT = @CAT1EXT@
CAT3EXT = @CAT3EXT@
# Additional GUI install/uninstall targets...
INSTALL_DESKTOP = @INSTALL_DESKTOP@
UNINSTALL_DESKTOP = @UNINSTALL_DESKTOP@
# Be quiet when building...
.SILENT: