From 115d539691f4e06adbaca9829e28b3552f29798c Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 15 Jan 2006 18:36:16 +0000 Subject: [PATCH] More packaging fun. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4756 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- Makefile | 2 ++ configure.in | 4 ++++ documentation/Makefile | 20 +++++++++++++++++++- documentation/checkers.man | 24 ++++++++++++++++++++++++ documentation/sudoku.man | 33 +++++++++++++++++++++++++++++++++ fltk.spec.in | 24 +++++++++++++++++++++++- makeinclude.in | 1 + test/Makefile | 8 ++++---- 8 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 documentation/checkers.man create mode 100644 documentation/sudoku.man diff --git a/Makefile b/Makefile index 2395d4673..d2d64fcf3 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ install: makeinclude done install-desktop: makeinclude + cd documentation; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP) cd fluid; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP) cd test; $(MAKE) $(MFLAGS) $(INSTALL_DESKTOP) @@ -57,6 +58,7 @@ uninstall: makeinclude done uninstall-desktop: makeinclude + cd documentation; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP) cd fluid; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP) cd test; $(MAKE) $(MFLAGS) $(UNINSTALL_DESKTOP) diff --git a/configure.in b/configure.in index 94f0b5139..cb04091fc 100644 --- a/configure.in +++ b/configure.in @@ -762,21 +762,25 @@ case "$uname" in # *BSD CAT1EXT=0 CAT3EXT=0 + CAT6EXT=0 ;; IRIX*) # SGI IRIX CAT1EXT=z CAT3EXT=z + CAT6EXT=z ;; *) # All others CAT1EXT=1 CAT3EXT=3 + CAT6EXT=3 ;; esac AC_SUBST(CAT1EXT) AC_SUBST(CAT3EXT) +AC_SUBST(CAT6EXT) dnl Fix "mandir" variable... if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then diff --git a/documentation/Makefile b/documentation/Makefile index d626b2053..585f2e414 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -211,7 +211,8 @@ IMAGEFILES = \ value_slider.gif -MANPAGES = fltk.$(CAT3EXT) fltk-config.$(CAT1EXT) fluid.$(CAT1EXT) +MANPAGES = fltk.$(CAT3EXT) fltk-config.$(CAT1EXT) fluid.$(CAT1EXT) \ + checkers.$(CAT6EXT) sudoku.$(CAT6EXT) all: $(MANPAGES) @@ -248,6 +249,18 @@ install: $(MANPAGES) $(CP) fltk.man $(DESTDIR)$(mandir)/man3/fltk.3 $(CHMOD) 644 $(DESTDIR)$(mandir)/man3/fltk.3 +install-linux install-osx: + -$(MKDIR) $(DESTDIR)$(mandir)/cat6 + $(CP) checkers.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6 + $(CHMOD) 644 $(DESTDIR)$(mandir)/cat6/checkers.$(CAT6EXT) + $(CP) sudoku.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6 + $(CHMOD) 644 $(DESTDIR)$(mandir)/cat6/sudoku.$(CAT6EXT) + -$(MKDIR) $(DESTDIR)$(mandir)/man6 + $(CP) checkers.man $(DESTDIR)$(mandir)/man6/checkers.6 + $(CHMOD) 644 $(DESTDIR)$(mandir)/man6/checkers.6 + $(CP) sudoku.man $(DESTDIR)$(mandir)/man6/sudoku.6 + $(CHMOD) 644 $(DESTDIR)$(mandir)/man6/sudoku.6 + uninstall: $(RMDIR) $(DESTDIR)$(docdir) @@ -258,6 +271,11 @@ uninstall: $(RM) $(DESTDIR)$(mandir)/cat3/fltk.$(CAT3EXT) $(RM) $(DESTDIR)$(mandir)/man3/fltk.3 +uninstall-linux uninstall-osx: + $(RM) $(DESTDIR)$(mandir)/cat6/checkers.$(CAT6EXT) + $(RM) $(DESTDIR)$(mandir)/cat6/sudoku.$(CAT6EXT) + $(RM) $(DESTDIR)$(mandir)/man6/checkers.6 + $(RM) $(DESTDIR)$(mandir)/man6/sudoku.6 # Base html files are now the readable ones, so this target is not make by # default... diff --git a/documentation/checkers.man b/documentation/checkers.man new file mode 100644 index 000000000..097277474 --- /dev/null +++ b/documentation/checkers.man @@ -0,0 +1,24 @@ +.TH checkers 6 "FLTK Checkers" "15 January 2006" +.SH NAME +checkers \- the fltk checkers game +.sp +.SH SYNOPSIS +\fICheckers\fR is a FLTK-based version of the game of checkers. +The game is played on an 8x8 board with each player starting with +12 pieces or "checkers" on opposite sides of the board. The +computer plays the white checkers in this version of the game. +.LP +The object of the game is to remove all of your opponents pieces. +Players move one of their pieces diagonally forward on each move, +either a single space or by "jumping" an adjacent piece. Your +opponents pieces are removed by jumping them - you can make +multiple jumps in a single turn. +.LP +If a piece reaches the other side of the board, it is converted +to a "king" which can move both forwards and backwards. +.SH SEE ALSO +fltk(3) +.br +FLTK Web Site, http://www.fltk.org/ +.SH AUTHORS +Bill Spitzak and others. diff --git a/documentation/sudoku.man b/documentation/sudoku.man new file mode 100644 index 000000000..32d496e8e --- /dev/null +++ b/documentation/sudoku.man @@ -0,0 +1,33 @@ +.TH sudoku 6 "FLTK Sudoku" "15 January 2006" +.SH NAME +sudoku \- the fltk sudoku game +.sp +.SH SYNOPSIS +\fISudoku\fR is a FLTK-based version of the game of Sudoku. +Sudoku (pronounced soo-dough-coo with the emphasis on the first +syllable) is a simple number-based puzzle/game played on a 9x9 +grid that is divided into 3x3 subgrids. The goal is to enter a +number from 1 to 9 in each cell so that each number appears only +once in each column and row. +.LP +At the start of a new game, Sudoku fills in a random selection of +cells for you - the number of cells depends on the difficulty +level you use. Click in any of the empty cells or use the arrow +keys to highlight individual cells and press a number from 1 to 9 +to fill in the cell. To clear a cell, press 0, Delete, or +Backspace. As you complete each subgrid, correct subgrids are +highlighted in green. When you have successfully completed all +subgrids, the entire puzzle is highlighted until you start a new +game. +.LP +As you work to complete the puzzle, you can display possible +solutions inside each cell by holding the Shift key and pressing +each number in turn. Repeat the process to remove individual +numbers, or press a number without the Shift key to replace them +with the actual number to use. +.SH SEE ALSO +fltk(3) +.br +FLTK Web Site, http://www.fltk.org/ +.SH AUTHOR +Michael R Sweet. diff --git a/fltk.spec.in b/fltk.spec.in index 355f129cf..20899e28c 100644 --- a/fltk.spec.in +++ b/fltk.spec.in @@ -91,28 +91,50 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) + %dir %{prefix}/bin %{prefix}/bin/fltk-config %{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}/* +%{_mandir}/cat1/* +%{_mandir}/cat3/* +%{_mandir}/man1/* +%{_mandir}/man3/* + %dir %{prefix}/share/doc/fltk %{prefix}/share/doc/fltk/* + +%dir %{prefix}/share/applnk %{prefix}/share/applnk/Development/* + +%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/checkers %{prefix}/bin/sudoku + +%dir %{_mandir} +%{_mandir}/cat6/* +%{_mandir}/man6/* + +%dir %{prefix}/share/applnk %{prefix}/share/applnk/Games/* + +%dir %{prefix}/share/icons %{prefix}/share/icons/hicolor/*/apps/checkers.png %{prefix}/share/icons/hicolor/*/apps/sudoku.png diff --git a/makeinclude.in b/makeinclude.in index c067e131d..8c89813a2 100644 --- a/makeinclude.in +++ b/makeinclude.in @@ -104,6 +104,7 @@ POSTBUILD = @POSTBUILD@ # Man page extensions... CAT1EXT = @CAT1EXT@ CAT3EXT = @CAT3EXT@ +CAT6EXT = @CAT6EXT@ # Additional GUI install/uninstall targets... INSTALL_DESKTOP = @INSTALL_DESKTOP@ diff --git a/test/Makefile b/test/Makefile index 925a00fe1..3aa9463a9 100644 --- a/test/Makefile +++ b/test/Makefile @@ -184,14 +184,14 @@ 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; \ + -$(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; \ + $(CP) $$game-32.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/$$game.png; \ + $(CP) $$game-128.png $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/$$game.png; \ done install-osx: