diff options
| -rw-r--r-- | CMakeLists.txt | 12 | ||||
| -rw-r--r-- | README.CPack.txt | 83 | ||||
| -rw-r--r-- | fltk.list.in | 446 | ||||
| -rw-r--r-- | fltk.spec.in | 131 | ||||
| -rw-r--r-- | package/CMakeLists.txt | 48 |
5 files changed, 143 insertions, 577 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea0b37067..aeec6dfa8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -350,6 +350,18 @@ if(FLTK_BUILD_SHARED_LIBS AND GENERATE_EXPORT_HEADERS) endif(FLTK_BUILD_SHARED_LIBS AND GENERATE_EXPORT_HEADERS) ####################################################################### +# Configure CPack only if this is the top level project. +# The logic may be extended if including CPack is made optional. +# Currently it is included unconditionally for testing purposes. +####################################################################### + +if(FLTK_IS_TOPLEVEL) + + add_subdirectory(package) + +endif() + +####################################################################### # Output Build Configuration Summary ####################################################################### diff --git a/README.CPack.txt b/README.CPack.txt new file mode 100644 index 000000000..e9f11dd85 --- /dev/null +++ b/README.CPack.txt @@ -0,0 +1,83 @@ +README.CPack.txt - Building Binary Packages with CPack +------------------------------------------------------- + +Intended Audience +----------------- + +"Packagers" (maintainers) of Linux distributions or users who want to +deploy FLTK binary packages on multiple systems, e.g. companies using +FLTK for their software development. + + +Introduction +------------ + +In previous FLTK versions binary packages could be created using EPM +(an external tool) or `rpmbuild` on Linux. Both tools used files no +longer provided by FLTK: 'fltk.list' (EPM) and 'fltk.spec' (RPM). + +FLTK 1.5 and later supports CPack to create binary "packages". The new +approach using CPack is more flexible and supports many more package +formats. CPack is usually installed together with CMake. + +CPack support is still experimental and may be improved in the future. +The documentation below may be enhanced later if required. + + +How To Build Binary Packages +---------------------------- + +On some platforms and with some "generators" CMake creates the target +'package' so you can execute e.g. `make package` after building FLTK. +This creates the default set of packages for the given platform. + +On other platforms, or to use more flexible options, `cpack` may be run +from the commandline after building FLTK to generate a particular package +format. For details please refer to the CMake and CPack documentation. + + +Example Commands On Linux Using Ninja +------------------------------------- + +1. Build the FLTK library: + +$ cd /path-to-fltk +$ cmake -G Ninja -D CMAKE_BUILD_TYPE=Release -B build +$ cmake --build build + +2. Create one or more binary packages: + +$ cmake --build build --target package + +... or ... + +$ cd build +$ ninja package # or `make package` if you're using Makefiles + +... or to build (only) the RPM package: + +$ cpack -G RPM + +... or to build a .tar.gz package: + +$ cpack -G TGZ + +See `cpack --help` for possible package formats ("Generators"). + +Note: you need to install the package format specific tools on your system +to create some package formats, e.g. `rpmbuild` for RPM packages. + + +Further Reading +--------------- + +More information on this topic can be found in the CMake and CPack +documentation or by executing `cpack --help`. + + +Links: To Documentation +----------------------- + +https://cmake.org/cmake/help/latest/index.html +https://cmake.org/cmake/help/latest/manual/cmake.1.html +https://cmake.org/cmake/help/latest/manual/cpack.1.html diff --git a/fltk.list.in b/fltk.list.in deleted file mode 100644 index bfa2f3e52..000000000 --- a/fltk.list.in +++ /dev/null @@ -1,446 +0,0 @@ -# -# EPM product list file for the Fast Light Tool Kit (FLTK). -# -# (EPM can be found at https://www.msweet.org/epm/) -# -# Copyright 1998-2023 by Bill Spitzak and others. -# -# This library is free software. Distribution and use rights are outlined in -# the file "COPYING" which should have been included with this file. If this -# file is missing or damaged, see the license at: -# -# https://www.fltk.org/COPYING.php -# -# Please see the following page on how to report bugs and issues: -# -# https://www.fltk.org/bugs.php -# - -%product Fast Light Tool Kit (FLTK) -%copyright 1998-2023 by Bill Spitzak and others. -%vendor FLTK Development Team -%license COPYING -%readme README.txt -%version @FLTK_VERSION@ -%description The Fast Light Tool Kit ("FLTK") is a cross-platform C++ GUI -%description toolkit for UNIX(r)/Linux(r) (X11), Microsoft(r) Windows(r), -%description and macOS(r). FLTK provides modern GUI functionality without -%description bloat and supports 3D graphics via OpenGL(r) and its built-in -%description GLUT emulation. - -$prefix=@prefix@ -$exec_prefix=@exec_prefix@ -$bindir=@bindir@ -$datarootdir=@datarootdir@ -$datadir=@datadir@ -$includedir=@includedir@ -$libdir=@libdir@ -$mandir=@mandir@ -$docdir=${datadir}/doc/fltk - -$CAT1EXT=@CAT1EXT@ -$CAT3EXT=@CAT3EXT@ -$CAT6EXT=@CAT6EXT@ - -$DSONAME=@DSONAME@ -$FLDSONAME=@FLDSONAME@ -$FLLIBNAME=@FLLIBNAME@ -$GLDSONAME=@GLDSONAME@ -$GLLIBNAME=@GLLIBNAME@ -$FLUID=@FLUID@ -$FLTK_OPTIONS=@FLTK_OPTIONS@ -$JPEG=@JPEG@ -$PNG=@PNG@ -$ZLIB=@ZLIB@ - -%if DSONAME -%system aix -f 0555 root sys $libdir/libfltk_s.a src/libfltk_s.a nostrip() -%system hpux -f 0555 root sys $libdir/libfltk.sl.@FL_DSO_VERSION@ src/libfltk.sl.@FL_DSO_VERSION@ nostrip() -%system darwin -f 0555 root sys $libdir/libfltk.@FL_DSO_VERSION@.dylib src/libfltk.@FL_DSO_VERSION@.dylib nostrip() -%system !aix !darwin !hpux -f 0555 root sys $libdir/libfltk.so.@FL_DSO_VERSION@ src/libfltk.so.@FL_DSO_VERSION@ nostrip() -%system all - -%system aix -f 0555 root sys $libdir/libfltk_forms_s.a src/libfltk_forms_s.a nostrip() -%system hpux -f 0555 root sys $libdir/libfltk_forms.sl.@FL_DSO_VERSION@ src/libfltk_forms.sl.@FL_DSO_VERSION@ nostrip() -%system darwin -f 0555 root sys $libdir/libfltk_forms.@FL_DSO_VERSION@.dylib src/libfltk_forms.@FL_DSO_VERSION@.dylib nostrip() -%system !aix !darwin !hpux -f 0555 root sys $libdir/libfltk_forms.so.@FL_DSO_VERSION@ src/libfltk_forms.so.@FL_DSO_VERSION@ nostrip() -%system all - -%system aix -f 0555 root sys $libdir/libfltk_images_s.a src/libfltk_images_s.a nostrip() -%system hpux -f 0555 root sys $libdir/libfltk_images.sl.@FL_DSO_VERSION@ src/libfltk_images.sl.@FL_DSO_VERSION@ nostrip() -%system darwin -f 0555 root sys $libdir/libfltk_images.@FL_DSO_VERSION@.dylib src/libfltk_images.@FL_DSO_VERSION@.dylib nostrip() -%system !aix !darwin !hpux -f 0555 root sys $libdir/libfltk_images.so.@FL_DSO_VERSION@ src/libfltk_images.so.@FL_DSO_VERSION@ nostrip() -%system all -%endif - -%if GLDSONAME -%system aix -f 0555 root sys $libdir/libfltk_gl_s.a src/libfltk_gl_s.a nostrip() -%system hpux -f 0555 root sys $libdir/libfltk_gl.sl.@FL_DSO_VERSION@ src/libfltk_gl.sl.@FL_DSO_VERSION@ nostrip() -%system darwin -f 0555 root sys $libdir/libfltk_gl.@FL_DSO_VERSION@.dylib src/libfltk_gl.@FL_DSO_VERSION@.dylib nostrip() -%system !aix !darwin !hpux -f 0555 root sys $libdir/libfltk_gl.so.@FL_DSO_VERSION@ src/libfltk_gl.so.@FL_DSO_VERSION@ nostrip() -%system all -%endif - - -%subpackage devel -%description FLTK Development Environment -%description Install fltk-devel if you need to develop FLTK applications. -%description You'll need to install the fltk package if you plan to run -%description dynamically linked applications. - -%system darwin -d 0555 root sys /Applications/fluid.app - -d 0555 root sys /Applications/fluid.app/Contents - -f 0444 root sys /Applications/fluid.app/Contents/Info.plist fluid/fluid.app/Contents/Info.plist -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.app/Contents/Resources/fluid.icns -%postinstall $bindir/fltk-config --post $bindir/fluid -%postremove /bin/rm -rf /Applications/fluid.app - -d 0555 root sys /Applications/fltk-options.app - -d 0555 root sys /Applications/fltk-options.app/Contents - -f 0444 root sys /Applications/fltk-options.app/Contents/Info.plist fltk-options/fltk-options.app/Contents/Info.plist -d 0555 root sys /Applications/fltk-options.app/Contents/MacOS - -l 0555 root sys /Applications/fltk-options.app/Contents/MacOS/fltk-options $bindir/fltk-options -d 0555 root sys /Applications/fltk-options.app/Contents/Resources - -f 0444 root sys /Applications/fltk-options.app/Contents/Resources/fltk-options.icns fltk-options/fltk-options.app/Contents/Resources/fltk-options.icns -%postinstall $bindir/fltk-config --post $bindir/fltk-options -%postremove /bin/rm -rf /Applications/fltk-options.app - -%system !darwin -f 0444 root sys /usr/share/applications/fluid.desktop fluid/fluid.desktop -f 0444 root sys /usr/share/icons/hicolor/16x16/apps/fluid.png fluid/icons/fluid-16.png -f 0444 root sys /usr/share/icons/hicolor/32x32/apps/fluid.png fluid/icons/fluid-32.png -f 0444 root sys /usr/share/icons/hicolor/48x48/apps/fluid.png fluid/icons/fluid-48.png -f 0444 root sys /usr/share/icons/hicolor/64x64/apps/fluid.png fluid/icons/fluid-64.png -f 0444 root sys /usr/share/icons/hicolor/128x128/apps/fluid.png fluid/icons/fluid-128.png -f 0444 root sys /usr/share/mimelnk/application/x-fluid.desktop fluid/fluid.desktop - -f 0444 root sys /usr/share/applications/fltk-options.desktop fltk-options/fltk-options.desktop -f 0444 root sys /usr/share/icons/hicolor/16x16/apps/fltk-options.png fltk-options/icons/fltk-options-16.png -f 0444 root sys /usr/share/icons/hicolor/32x32/apps/fltk-options.png fltk-options/icons/fltk-options-32.png -f 0444 root sys /usr/share/icons/hicolor/48x48/apps/fltk-options.png fltk-options/icons/fltk-options-48.png -f 0444 root sys /usr/share/icons/hicolor/64x64/apps/fltk-options.png fltk-options/icons/fltk-options-64.png -f 0444 root sys /usr/share/icons/hicolor/128x128/apps/fltk-options.png fltk-options/icons/fltk-options-128.png -f 0444 root sys /usr/share/mimelnk/application/x-fltk-options.desktop fltk-options/fltk-options.desktop - -%system all - -# Applications -f 0555 root sys $bindir/fluid fluid/$FLUID -f 0555 root sys $bindir/fltk-options fltk-options/$FLTK_OPTIONS -f 0555 root sys $bindir/fltk-config fltk-config - -# Man pages -f 0444 root sys $mandir/cat1/fluid.$CAT1EXT documentation/src/fluid.$CAT1EXT -f 0444 root sys $mandir/cat1/fltk-options.$CAT1EXT documentation/src/fltk-options.$CAT1EXT -f 0444 root sys $mandir/cat1/fltk-config.$CAT1EXT documentation/src/fltk-config.$CAT1EXT -f 0444 root sys $mandir/cat3/fltk.$CAT3EXT documentation/src/fltk.$CAT3EXT -f 0444 root sys $mandir/man1/fluid.1 documentation/src/fluid.man -f 0444 root sys $mandir/man1/fltk-options.1 documentation/src/fltk-options.man -f 0444 root sys $mandir/man1/fltk-config.1 documentation/src/fltk-config.man -f 0444 root sys $mandir/man3/fltk.3 documentation/src/fltk.man - -# Library files -f 0444 root sys $libdir/libfltk.a lib/libfltk.a -f 0444 root sys $libdir/libfltk_forms.a lib/libfltk_forms.a -f 0444 root sys $libdir/libfltk_images.a lib/libfltk_images.a -%if GLLIBNAME -f 0444 root sys $libdir/libfltk_gl.a lib/libfltk_gl.a -%endif - -%if JPEG -f 0444 root sys $libdir/libfltk_jpeg.a lib/libfltk_jpeg.a -%endif - -%if PNG -f 0444 root sys $libdir/libfltk_png.a lib/libfltk_png.a -%endif - -%if ZLIB -f 0444 root sys $libdir/libfltk_z.a lib/libfltk_z.a -%endif - -%if DSONAME -%system hpux -l 0000 root sys $libdir/libfltk.sl libfltk.sl.@FL_DSO_VERSION@ -%system darwin -l 0000 root sys $libdir/libfltk.dylib libfltk.@FL_DSO_VERSION@.dylib -%system !aix !darwin !hpux -l 0000 root sys $libdir/libfltk.so libfltk.so.@FL_DSO_VERSION@ -%system all - -%system hpux -l 0000 root sys $libdir/libfltk_forms.sl libfltk_forms.sl.@FL_DSO_VERSION@ -%system darwin -l 0000 root sys $libdir/libfltk_forms.dylib libfltk_forms.@FL_DSO_VERSION@.dylib -%system !aix !darwin !hpux -l 0000 root sys $libdir/libfltk_forms.so libfltk_forms.so.@FL_DSO_VERSION@ -%system all - -%system hpux -l 0000 root sys $libdir/libfltk_images.sl libfltk_images.sl.@FL_DSO_VERSION@ -%system darwin -l 0000 root sys $libdir/libfltk_images.dylib libfltk_images.@FL_DSO_VERSION@.dylib -%system !aix !darwin !hpux -l 0000 root sys $libdir/libfltk_images.so libfltk_images.so.@FL_DSO_VERSION@ -%system all -%endif - -%if GLDSONAME -%system hpux -l 0000 root sys $libdir/libfltk_gl.sl libfltk_gl.sl.@FL_DSO_VERSION@ -%system darwin -l 0000 root sys $libdir/libfltk_gl.dylib libfltk_gl.@FL_DSO_VERSION@.dylib -%system !aix !darwin !hpux -l 0000 root sys $libdir/libfltk_gl.so libfltk_gl.so.@FL_DSO_VERSION@ -%system all -%endif - -# Header files -f 0444 root sys $includedir/FL/ FL/*.[hH] - -%if JPEG -f 0444 root sys $includedir/FL/images/jconfig.h jpeg/jconfig.h -f 0444 root sys $includedir/FL/images/jerror.h jpeg/jerror.h -f 0444 root sys $includedir/FL/images/jmorecfg.h jpeg/jmorecfg.h -f 0444 root sys $includedir/FL/images/jpeglib.h jpeg/jpeglib.h -%endif - -%if PNG -f 0444 root sys $includedir/FL/images/png.h png/png.h -f 0444 root sys $includedir/FL/images/pngconf.h png/pngconf.h -f 0444 root sys $includedir/FL/images/pnglibconf.h png/pnglibconf.h -%endif - -%if ZLIB -f 0444 root sys $includedir/FL/images/zconf.h zlib/zconf.h -f 0444 root sys $includedir/FL/images/zlib.h zlib/zlib.h -f 0444 root sys $includedir/FL/images/zutil.h zlib/zutil.h -%endif - -%system !darwin -# Symlinks to handle common case problems... -l 0000 root sys $includedir/Fl FL -l 0000 root sys $includedir/FL/Enumerations.h Enumerations.H -l 0000 root sys $includedir/FL/Fl.h Fl.H -l 0000 root sys $includedir/FL/Fl_Adjuster.h Fl_Adjuster.H -l 0000 root sys $includedir/FL/Fl_Bitmap.h Fl_Bitmap.H -l 0000 root sys $includedir/FL/Fl_BMP_Image.h Fl_BMP_Image.H -l 0000 root sys $includedir/FL/Fl_Box.h Fl_Box.H -l 0000 root sys $includedir/FL/Fl_Browser.h Fl_Browser.H -l 0000 root sys $includedir/FL/Fl_Browser_.h Fl_Browser_.H -l 0000 root sys $includedir/FL/Fl_Button.h Fl_Button.H -l 0000 root sys $includedir/FL/Fl_Cairo.h Fl_Cairo.H -l 0000 root sys $includedir/FL/Fl_Cairo_Window.h Fl_Cairo_Window.H -l 0000 root sys $includedir/FL/Fl_Chart.h Fl_Chart.H -l 0000 root sys $includedir/FL/Fl_Check_Browser.h Fl_Check_Browser.H -l 0000 root sys $includedir/FL/Fl_Check_Button.h Fl_Check_Button.H -l 0000 root sys $includedir/FL/Fl_Choice.h Fl_Choice.H -l 0000 root sys $includedir/FL/Fl_Clock.h Fl_Clock.H -l 0000 root sys $includedir/FL/Fl_Color_Chooser.h Fl_Color_Chooser.H -l 0000 root sys $includedir/FL/Fl_Counter.h Fl_Counter.H -l 0000 root sys $includedir/FL/Fl_Device.h Fl_Device.H -l 0000 root sys $includedir/FL/Fl_Dial.h Fl_Dial.H -l 0000 root sys $includedir/FL/Fl_Double_Window.h Fl_Double_Window.H -l 0000 root sys $includedir/FL/Fl_Export.h Fl_Export.H -l 0000 root sys $includedir/FL/Fl_File_Browser.h Fl_File_Browser.H -l 0000 root sys $includedir/FL/Fl_File_Chooser.h Fl_File_Chooser.H -l 0000 root sys $includedir/FL/Fl_File_Icon.h Fl_File_Icon.H -l 0000 root sys $includedir/FL/Fl_Fill_Dial.h Fl_Fill_Dial.H -l 0000 root sys $includedir/FL/Fl_Fill_Slider.h Fl_Fill_Slider.H -l 0000 root sys $includedir/FL/Fl_Float_Input.h Fl_Float_Input.H -l 0000 root sys $includedir/FL/Fl_FormsBitmap.h Fl_FormsBitmap.H -l 0000 root sys $includedir/FL/Fl_FormsPixmap.h Fl_FormsPixmap.H -l 0000 root sys $includedir/FL/Fl_Free.h Fl_Free.H -l 0000 root sys $includedir/FL/Fl_GIF_Image.h Fl_GIF_Image.H -l 0000 root sys $includedir/FL/Fl_Gl_Window.h Fl_Gl_Window.H -l 0000 root sys $includedir/FL/Fl_Group.h Fl_Group.H -l 0000 root sys $includedir/FL/Fl_Help_Dialog.h Fl_Help_Dialog.H -l 0000 root sys $includedir/FL/Fl_Help_View.h Fl_Help_View.H -l 0000 root sys $includedir/FL/Fl_Hold_Browser.h Fl_Hold_Browser.H -l 0000 root sys $includedir/FL/Fl_Hor_Fill_Slider.h Fl_Hor_Fill_Slider.H -l 0000 root sys $includedir/FL/Fl_Hor_Nice_Slider.h Fl_Hor_Nice_Slider.H -l 0000 root sys $includedir/FL/Fl_Hor_Slider.h Fl_Hor_Slider.H -l 0000 root sys $includedir/FL/Fl_Hor_Value_Slider.h Fl_Hor_Value_Slider.H -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 -l 0000 root sys $includedir/FL/Fl_Menu.h Fl_Menu.H -l 0000 root sys $includedir/FL/Fl_Menu_.h Fl_Menu_.H -l 0000 root sys $includedir/FL/Fl_Menu_Bar.h Fl_Menu_Bar.H -l 0000 root sys $includedir/FL/Fl_Menu_Button.h Fl_Menu_Button.H -l 0000 root sys $includedir/FL/Fl_Menu_Item.h Fl_Menu_Item.H -l 0000 root sys $includedir/FL/Fl_Menu_Window.h Fl_Menu_Window.H -l 0000 root sys $includedir/FL/Fl_Multi_Browser.h Fl_Multi_Browser.H -l 0000 root sys $includedir/FL/Fl_Multi_Label.h Fl_Multi_Label.H -l 0000 root sys $includedir/FL/Fl_Multiline_Input.h Fl_Multiline_Input.H -l 0000 root sys $includedir/FL/Fl_Multiline_Output.h Fl_Multiline_Output.H -l 0000 root sys $includedir/FL/Fl_Native_File_Chooser.h Fl_Native_File_Chooser.H -l 0000 root sys $includedir/FL/Fl_Nice_Slider.h Fl_Nice_Slider.H -l 0000 root sys $includedir/FL/Fl_Object.h Fl_Object.H -l 0000 root sys $includedir/FL/Fl_Output.h Fl_Output.H -l 0000 root sys $includedir/FL/Fl_Overlay_Window.h Fl_Overlay_Window.H -l 0000 root sys $includedir/FL/Fl_Pack.h Fl_Pack.H -l 0000 root sys $includedir/FL/Fl_Paged_Device.h Fl_Paged_Device.H -l 0000 root sys $includedir/FL/Fl_Pixmap.h Fl_Pixmap.H -l 0000 root sys $includedir/FL/Fl_Plugin.h Fl_Plugin.H -l 0000 root sys $includedir/FL/Fl_PNG_Image.h Fl_PNG_Image.H -l 0000 root sys $includedir/FL/Fl_PNM_Image.h Fl_PNM_Image.H -l 0000 root sys $includedir/FL/Fl_Positioner.h Fl_Positioner.H -l 0000 root sys $includedir/FL/Fl_PostScript.h Fl_PostScript.H -l 0000 root sys $includedir/FL/Fl_Preferences.h Fl_Preferences.H -l 0000 root sys $includedir/FL/Fl_Printer.h Fl_Printer.H -l 0000 root sys $includedir/FL/Fl_Progress.h Fl_Progress.H -l 0000 root sys $includedir/FL/Fl_Radio_Button.h Fl_Radio_Button.H -l 0000 root sys $includedir/FL/Fl_Radio_Light_Button.h Fl_Radio_Light_Button.H -l 0000 root sys $includedir/FL/Fl_Radio_Round_Button.h Fl_Radio_Round_Button.H -l 0000 root sys $includedir/FL/Fl_Repeat_Button.h Fl_Repeat_Button.H -l 0000 root sys $includedir/FL/Fl_Return_Button.h Fl_Return_Button.H -l 0000 root sys $includedir/FL/Fl_Roller.h Fl_Roller.H -l 0000 root sys $includedir/FL/Fl_Round_Button.h Fl_Round_Button.H -l 0000 root sys $includedir/FL/Fl_Round_Clock.h Fl_Round_Clock.H -l 0000 root sys $includedir/FL/Fl_Scroll.h Fl_Scroll.H -l 0000 root sys $includedir/FL/Fl_Scrollbar.h Fl_Scrollbar.H -l 0000 root sys $includedir/FL/Fl_Secret_Input.h Fl_Secret_Input.H -l 0000 root sys $includedir/FL/Fl_Select_Browser.h Fl_Select_Browser.H -l 0000 root sys $includedir/FL/Fl_Shared_Image.h Fl_Shared_Image.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_Sys_Menu_Bar.h Fl_Sys_Menu_Bar.H -l 0000 root sys $includedir/FL/Fl_Table.h Fl_Table.H -l 0000 root sys $includedir/FL/Fl_Table_Row.h Fl_Table_Row.H -l 0000 root sys $includedir/FL/Fl_Tabs.h Fl_Tabs.H -l 0000 root sys $includedir/FL/Fl_Text_Buffer.h Fl_Text_Buffer.H -l 0000 root sys $includedir/FL/Fl_Text_Display.h Fl_Text_Display.H -l 0000 root sys $includedir/FL/Fl_Text_Editor.h Fl_Text_Editor.H -l 0000 root sys $includedir/FL/Fl_Tile.h Fl_Tile.H -l 0000 root sys $includedir/FL/Fl_Tiled_Image.h Fl_Tiled_Image.H -l 0000 root sys $includedir/FL/Fl_Timer.h Fl_Timer.H -l 0000 root sys $includedir/FL/Fl_Toggle_Button.h Fl_Toggle_Button.H -l 0000 root sys $includedir/FL/Fl_Toggle_Light_Button.h Fl_Toggle_Light_Button.H -l 0000 root sys $includedir/FL/Fl_Toggle_Round_Button.h Fl_Toggle_Round_Button.H -l 0000 root sys $includedir/FL/Fl_Tooltip.h Fl_Tooltip.H -l 0000 root sys $includedir/FL/Fl_Tree.h Fl_Tree.H -l 0000 root sys $includedir/FL/Fl_Tree_Item.h Fl_Tree_Item.H -l 0000 root sys $includedir/FL/Fl_Tree_Item_Array.h Fl_Tree_Item_Array.H -l 0000 root sys $includedir/FL/Fl_Tree_Prefs.h Fl_Tree_Prefs.H -l 0000 root sys $includedir/FL/Fl_Valuator.h Fl_Valuator.H -l 0000 root sys $includedir/FL/Fl_Value_Input.h Fl_Value_Input.H -l 0000 root sys $includedir/FL/Fl_Value_Output.h Fl_Value_Output.H -l 0000 root sys $includedir/FL/Fl_Value_Slider.h Fl_Value_Slider.H -l 0000 root sys $includedir/FL/Fl_Widget.h Fl_Widget.H -l 0000 root sys $includedir/FL/Fl_Window.h Fl_Window.H -l 0000 root sys $includedir/FL/Fl_Wizard.h Fl_Wizard.H -l 0000 root sys $includedir/FL/Fl_XBM_Image.h Fl_XBM_Image.H -l 0000 root sys $includedir/FL/Fl_XPM_Image.h Fl_XPM_Image.H -l 0000 root sys $includedir/FL/filename.h filename.H -l 0000 root sys $includedir/FL/fl_ask.h fl_ask.H -l 0000 root sys $includedir/FL/fl_draw.h fl_draw.H -l 0000 root sys $includedir/FL/fl_message.h fl_message.H -l 0000 root sys $includedir/FL/fl_show_colormap.h fl_show_colormap.H -l 0000 root sys $includedir/FL/fl_show_input.h fl_show_input.H -l 0000 root sys $includedir/FL/forms.h forms.H -l 0000 root sys $includedir/FL/gl_draw.h gl_draw.H -l 0000 root sys $includedir/FL/glut.h glut.H -l 0000 root sys $includedir/FL/mac.h mac.H -l 0000 root sys $includedir/FL/platform.h platform.H -l 0000 root sys $includedir/FL/win32.h win32.H -l 0000 root sys $includedir/FL/x.h x.H -%system all - -# Documentation -d 0555 root sys $docdir - -f 0444 root sys $docdir/ documentation/html/*.gif -f 0444 root sys $docdir/ documentation/html/*.html -f 0444 root sys $docdir/ documentation/html/*.jpg -f 0444 root sys $docdir/COPYING COPYING -f 0444 root sys $docdir/CHANGES.txt CHANGES.txt - -# Examples -d 0555 root sys $docdir/examples -f 0444 root sys $docdir/examples/config.h config.h -f 0444 root sys $docdir/examples/ test/*.cxx -f 0444 root sys $docdir/examples/ test/*.fl -f 0444 root sys $docdir/examples/ test/*.h - -%subpackage games -%description FLTK Games -%description Install fltk-games to play Block Attack!, checkers, or Sudoku on your computer. - -%system darwin -d 0555 root sys /Applications/blocks.app - -d 0555 root sys /Applications/blocks.app/Contents - -f 0444 root sys /Applications/blocks.app/Contents/Info.plist test/blocks.app/Contents/Info.plist -d 0555 root sys /Applications/blocks.app/Contents/MacOS - -f 0555 root sys /Applications/blocks.app/Contents/MacOS/blocks test/blocks -d 0555 root sys /Applications/blocks.app/Contents/Resources - -f 0444 root sys /Applications/blocks.app/Contents/Resources/blocks.icns test/blocks.app/Contents/Resources/blocks.icns -%postremove /bin/rm -rf /Applications/blocks.app - -d 0555 root sys /Applications/checkers.app - -d 0555 root sys /Applications/checkers.app/Contents - -f 0444 root sys /Applications/checkers.app/Contents/Info.plist test/checkers.app/Contents/Info.plist -d 0555 root sys /Applications/checkers.app/Contents/MacOS - -f 0555 root sys /Applications/checkers.app/Contents/MacOS/checkers test/checkers -d 0555 root sys /Applications/checkers.app/Contents/Resources - -f 0444 root sys /Applications/checkers.app/Contents/Resources/checkers.icns test/checkers.app/Contents/Resources/checkers.icns -%postremove /bin/rm -rf /Applications/checkers.app - -d 0555 root sys /Applications/sudoku.app - -d 0555 root sys /Applications/sudoku.app/Contents - -f 0444 root sys /Applications/sudoku.app/Contents/Info.plist test/sudoku.app/Contents/Info.plist -d 0555 root sys /Applications/sudoku.app/Contents/MacOS - -f 0555 root sys /Applications/sudoku.app/Contents/MacOS/sudoku test/sudoku -d 0555 root sys /Applications/sudoku.app/Contents/Resources - -f 0444 root sys /Applications/sudoku.app/Contents/Resources/sudoku.icns test/sudoku.app/Contents/Resources/sudoku.icns -%postremove /bin/rm -rf /Applications/sudoku.app - -%system !darwin -f 0555 root sys $bindir/blocks test/blocks -f 0444 root sys /usr/share/applications/blocks.desktop test/desktop/blocks.desktop -f 0444 root sys /usr/share/icons/hicolor/32x32/apps/blocks.png test/desktop/blocks-32.png -f 0444 root sys /usr/share/icons/hicolor/128x128/apps/blocks.png test/desktop/blocks-128.png - -f 0555 root sys $bindir/checkers test/checkers -f 0444 root sys /usr/share/applications/checkers.desktop test/desktop/checkers.desktop -f 0444 root sys /usr/share/icons/hicolor/32x32/apps/checkers.png test/desktop/checkers-32.png -f 0444 root sys /usr/share/icons/hicolor/128x128/apps/checkers.png test/desktop/checkers-128.png - -f 0555 root sys $bindir/sudoku test/sudoku -f 0444 root sys /usr/share/applications/sudoku.desktop test/desktop/sudoku.desktop -f 0444 root sys /usr/share/icons/hicolor/32x32/apps/sudoku.png test/desktop/sudoku-32.png -f 0444 root sys /usr/share/icons/hicolor/128x128/apps/sudoku.png test/desktop/sudoku-128.png - -%system all -f 0444 root sys $mandir/cat6/blocks.$CAT6EXT documentation/src/blocks.$CAT6EXT -f 0444 root sys $mandir/cat6/checkers.$CAT6EXT documentation/src/checkers.$CAT6EXT -f 0444 root sys $mandir/cat6/sudoku.$CAT6EXT documentation/src/sudoku.$CAT6EXT -f 0444 root sys $mandir/man6/blocks.6 documentation/src/blocks.man -f 0444 root sys $mandir/man6/checkers.6 documentation/src/checkers.man -f 0444 root sys $mandir/man6/sudoku.6 documentation/src/sudoku.man diff --git a/fltk.spec.in b/fltk.spec.in deleted file mode 100644 index 7b8a990a4..000000000 --- a/fltk.spec.in +++ /dev/null @@ -1,131 +0,0 @@ -# -# RPM spec file for FLTK. -# -# Copyright 1998-2024 by Bill Spitzak and others. -# -# This library is free software. Distribution and use rights are outlined in -# the file "COPYING" which should have been included with this file. If this -# file is missing or damaged, see the license at: -# -# https://www.fltk.org/COPYING.php -# -# Please see the following page on how to report bugs and issues: -# -# https://www.fltk.org/bugs.php -# - -%define version @FLTK_VERSION@ -%define release 1 -%define prefix /usr - -Summary: Fast Light Tool Kit (FLTK) -Name: fltk -Version: %{version} -Release: %{release} -License: LGPL -Group: System Environment/Libraries -Source: https://www.fltk.org/pub/fltk/%{version}/fltk-%{version}-source.tar.gz -URL: https://www.fltk.org/ -Packager: FLTK Developer <fltk@fltk.org> -# use BuildRoot so as not to disturb the version already installed -BuildRoot: /var/tmp/fltk-%{PACKAGE_VERSION} - -%description -The Fast Light Tool Kit ("FLTK") is a cross-platform C++ GUI -toolkit for UNIX(r)/Linux(r) (X11), Microsoft(r) Windows(r), -and macOS(r). FLTK provides modern GUI functionality without -bloat and supports 3D graphics via OpenGL(r) and its built-in -GLUT emulation. - -%package devel -Summary: FLTK Development Environment -Group: Development/Libraries - -%description devel -Install fltk-devel if you need to develop FLTK applications. -You'll need to install the fltk package if you plan to run -dynamically linked applications. - -%package games -Summary: FLTK Games -Group: Games - -%description games -Install fltk-games to play Block Attack!, Checkers, or Sudoku on your computer. - -%prep -%setup - -%build -CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --mandir=%{_mandir} --enable-largefile --enable-shared --enable-threads --enable-xft --enable-xinerama - -# If we got this far, all prerequisite libraries must be here. -make - -%install -# these lines just make sure the directory structure in the -# RPM_BUILD_ROOT exists -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT - -make -e DESTDIR=$RPM_BUILD_ROOT install install-desktop - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%dir %{prefix}/lib -%{prefix}/lib/libfltk*.so.* - -%files devel -%defattr(-,root,root) - -%dir %{prefix}/bin -%{prefix}/bin/fltk-config -%{prefix}/bin/fltk-options -%{prefix}/bin/fluid - -%dir %{prefix}/include/FL -%{prefix}/include/FL/* -%{prefix}/include/Fl - -%dir %{prefix}/lib -%{prefix}/lib/libfltk*.so -%{prefix}/lib/libfltk*.a - -%dir %{_mandir} -%{_mandir}/cat1/* -%{_mandir}/cat3/* -%{_mandir}/man1/* -%{_mandir}/man3/* - -%dir %{prefix}/share/doc/fltk -%{prefix}/share/doc/fltk/* - -%dir %{prefix}/share/applications -%{prefix}/share/applications/* - -%dir %{prefix}/share/icons -%{prefix}/share/icons/hicolor/*/apps/fluid.png - -%dir %{prefix}/share/mimelnk -%{prefix}/share/mimelnk/* - -%files games -%dir %{prefix}/bin -%{prefix}/bin/blocks -%{prefix}/bin/checkers -%{prefix}/bin/sudoku - -%dir %{_mandir} -%{_mandir}/cat6/* -%{_mandir}/man6/* - -%dir %{prefix}/share/applications -%{prefix}/share/applications/* - -%dir %{prefix}/share/icons -%{prefix}/share/icons/hicolor/*/apps/blocks.png -%{prefix}/share/icons/hicolor/*/apps/checkers.png -%{prefix}/share/icons/hicolor/*/apps/sudoku.png diff --git a/package/CMakeLists.txt b/package/CMakeLists.txt new file mode 100644 index 000000000..e47f546ce --- /dev/null +++ b/package/CMakeLists.txt @@ -0,0 +1,48 @@ +# +# CMakeLists.txt to enable CPack for the FLTK project +# +# Copyright 2025 by Bill Spitzak and others. +# +# This library is free software. Distribution and use rights are outlined in +# the file "COPYING" which should have been included with this file. If this +# file is missing or damaged, see the license at: +# +# https://www.fltk.org/COPYING.php +# +# Please see the following page on how to report bugs and issues: +# +# https://www.fltk.org/bugs.php +# + +# Note: this file is included by add_subdirectory() only if it really +# is to be used (top level project, maybe an option, etc.). +# Therefore the code below is executed unconditionally... + +####################################################################### +# Configure CPack parameters +####################################################################### + +set(CPACK_PACKAGE_NAME "FLTK") +set(CPACK_PACKAGE_VENDOR "The FLTK TEAM (fltk.org)") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cross-platform GUI development library") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") +set(CPACK_PACKAGE_VERSION_MAJOR "${FLTK_VERSION_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${FLTK_VERSION_MINOR}") +set(CPACK_PACKAGE_VERSION_PATCH "${FLTK_VERSION_PATCH}") + +set(CPACK_VERBATIM_VARIABLES TRUE) + +# The following files are used by *some* installers (not yet supported by FLTK). +# These files would be located in the same directory as this file. +# CMake uses default values if these variables are not defined. + +# set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_LIST_DIR}/Description.txt) +# set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_CURRENT_LIST_DIR}/Welcome.txt) +# set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/License.txt) +# set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_LIST_DIR}/Readme.txt) + +####################################################################### +# Include the CPack module +####################################################################### + +include(CPack) |
