]> thyrsus.com Git - deal.git/commitdiff
Ready to ship with new packaging.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 26 Dec 2003 18:34:15 +0000 (18:34 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 26 Dec 2003 18:34:15 +0000 (18:34 +0000)
Makefile
deal.spec
deal.xml

index 9a020c865ddbf0a1751e8c83ab4e073a714fb750..e721bfa851b2b473853ecf1347c3d604781b9cd0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,16 @@
 #
 # Makefile for the card probability calculator
 #
-# Note: When the version changes, you also have to change the RPM spec file.
-VERS=2.2
+VERS=2.3
 
 SOURCES = README COPYING Makefile deal.c deal.xml deal.spec
 
 deal: deal.c
        $(CC) -g deal.c  -lm -o deal
 
+clean:
+       rm -f deal deal.1 deal-*.tar.gz deal.o *.rpm *~
+
 deal-$(VERS).tar.gz: $(SOURCES) deal.1
        @ls $(SOURCES) deal.1 | sed s:^:deal-$(VERS)/: >MANIFEST
        @(cd ..; ln -s deal deal-$(VERS))
@@ -28,14 +30,8 @@ uninstall:
 dist: deal-$(VERS).tar.gz
 
 RPMROOT=/usr/src/redhat
-RPM = rpm
-RPMFLAGS = -ba
 rpm: dist
-       cp deal-$(VERS).tar.gz $(RPMROOT)/SOURCES;
-       cp deal.spec $(RPMROOT)/SPECS
-       cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) deal.spec       
-       cp $(RPMROOT)/RPMS/`arch|sed 's/i[4-9]86/i386/'`/deal-$(VERS)*.rpm .
+       rpmbuild --define 'myversion $(VERS)' -ta deal-$(VERS).tar.gz
+       cp $(RPMROOT)/RPMS/*/deal-$(VERS)*.rpm .
        cp $(RPMROOT)/SRPMS/deal-$(VERS)*.src.rpm .
 
-clean:
-       rm -f deal deal.1 deal-*.tar.gz deal.o *.rpm *~
index 2d9c8de5e03e1dc58d0a7a4456150f0b36427434..d7410fb5979c655dab4f8b905b8f292724c92fac 100644 (file)
--- a/deal.spec
+++ b/deal.spec
@@ -1,11 +1,12 @@
 Name: deal
-Version: 2.2
+Version: %{myversion}
 Release: 1
-URL: http://www.tuxedo.org/~esr/deal/
+URL: http://www.catb.org/~esr/deal/
 Source0: %{name}-%{version}.tar.gz
 License: GPL
 Group: Applications/Math
 Summary: calculator for card-draw (nonreplacement) probabilities
+%undefine __check_files
 
 %description
 This program is a calculator for card-draw probabilities.  Specifically
@@ -26,3 +27,8 @@ make install
 /usr/share/man/man1/deal.1
 /usr/bin/deal
 %doc README COPYING
+
+%changelog
+* Fri Dec 26 2003 Eric S. Raymond <esr@snark.thyrsus.com> 2.3
+- Fixed a man-page bug, updated RPM packaging machinery.
+
index 1a175caeb80660b72c0a55e6f59879bbc90d2eac..24a12182da6b91d92166edfdafec9cfdbb66e5ea 100644 (file)
--- a/deal.xml
+++ b/deal.xml
 <refsynopsisdiv id='synopsis'>
 
 <cmdsynopsis>
-  <!--  deal  [ \-h ]   [ \-b base ]   [ \-t turns ]   [ \-c columns ]   [ \-g ]   [ \-w ]  specials total -->
   <command>deal</command>  <arg choice='opt'>-h </arg>
   <arg choice='opt'>-b <replaceable>base</replaceable></arg>
   <arg choice='opt'>-t <replaceable>turns</replaceable></arg>
   <arg choice='opt'>-c <replaceable>columns</replaceable></arg>
   <arg choice='opt'>-g </arg>
   <arg choice='opt'>-w </arg>
-  <arg choice='plain'><replaceable>specialstotal</replaceable></arg>
+  <arg choice='plain'><replaceable>specials</replaceable></arg>
+  <arg choice='plain'><replaceable>total</replaceable></arg>
 </cmdsynopsis>
 
 </refsynopsisdiv>
@@ -38,11 +38,11 @@ the number of special cards contained in those k drawn cards.</para>
 <para>Then X has a hypergeometric distribution, with the following formula
 for probabilities:</para>
 
-<literallayout remap='.nf'>
+<literallayout>
                 B(M, i) * B(N-M, k-i)
      P(X = i) = ---------------------
                       B(N, k)
-</literallayout> <!-- .fi -->
+</literallayout>
 
 <para>where B(a,b) is the binomial coefficient (read "a choose b"), and is the
 number of ways to choose b objects out of a possible objects.  The
@@ -62,22 +62,14 @@ rounds to zero.  Impossible outcomes are blank.</para>
 <para>The program accepts the following options to control its output:</para>
 <variablelist remap='TP'>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-b </arg>
-</cmdsynopsis>
-</term>
+<term><option>-b base</option></term>
 <listitem>
 <para>Number of cards to assume in the initial hand.  Note: this defaults to
-7, <emphasis remap='B'>not to 0!</emphasis></para>
+7, <emphasis>not to 0!</emphasis></para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-g </arg>
-</cmdsynopsis>
-</term>
+<term><option>-g</option></term>
 <listitem>
 <para>Normally, the program displays the probability that you will
 have <emphasis>exactly</emphasis> a given number of specials.  With
@@ -88,88 +80,57 @@ show up in column 0 if nowhere else.</para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-w </arg>
-</cmdsynopsis>
-</term>
+<term><option>-w</option></term>
 <listitem>
-<para>Force wide display (3 chars per percentage) to accommodate 100% probabilities.</para>
+<para>Force wide display (3 chars per percentage) to accommodate 100%
+probabilities.</para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-c </arg>
-</cmdsynopsis>
-</term>
+<term><option>-c columns</option></term>
 <listitem>
 <para>Number of table columns to generate in the report.  Defaults to the
 number of specials plus one additional to accommodate the zero column.</para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-h </arg>
-</cmdsynopsis>
-</term>
+<term><option>-h</option></term>
 <listitem>
 <para>Suppress table headers and legends.</para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-t </arg>
-</cmdsynopsis>
-</term>
+<term><option>-t draws</option></term>
 <listitem>
 <para>Set number of draws to display probabilities for (default to 20 or the
 total number of cards, whichever is less)</para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-v </arg>
-</cmdsynopsis>
-</term>
+<term><option>-v</option></term>
 <listitem>
 <para>Verbose.  Log the computation steps for each hypergeometricoefficient to standard error.  Use this for debugging if you are
 a trained numerical analyst (kids, don't try this yourselves at home!).</para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-B </arg>
-</cmdsynopsis>
-</term>
+<term><option>-B</option></term>
 <listitem>
 <para>Binomial coefficient test.  Compute and print the binomial coefficient
 B(n, k) or `n choose k'.</para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-G </arg>
-</cmdsynopsis>
-</term>
+<term><option>-G</option></term>
 <listitem>
 <para>Gamma function test.  Compute and display the log of the gamma
-function of the argument.  If <option>-v</option> tells you that the computation of
-B(n, k) is blowing up, this will enable you to probe the local lgamma
-function.</para>
+function of the argument.  If <option>-v</option> tells you that the
+computation of B(n, k) is blowing up, this will enable you to probe
+the local lgamma function.</para>
 </listitem>
 </varlistentry>
 <varlistentry>
-<term>
-<cmdsynopsis>
-  <arg choice='plain'>-H </arg>
-</cmdsynopsis>
-</term>
+<term><option>-H</option></term>
 <listitem>
 <para>Compute the hypergeometric probability H(i, k, M, N) with arguments
 supplied from the command line.  For debugging.</para>
@@ -195,18 +156,18 @@ Gathering" deck (MtG starts you with 7 cards):</para>
 </refsect1>
 
 <refsect1 id='bugs'><title>BUGS</title>
-<para>The <option>-w</option> and <option>-g</option> options widen the column width of the tables to
-accommodate 100% probabilities, at the cost of making the table too
-wide to display on an 80-column terminal when the number of specials
-is more than 17.  When wide display is off, on the other hand, 23
-specials will fit in 80 colums, but 100% probabilities can mess up the
-table formatting.</para>
+<para>The <option>-w</option> and <option>-g</option> options widen
+the column width of the tables to accommodate 100% probabilities, at
+the cost of making the table too wide to display on an 80-column
+terminal when the number of specials is more than 17.  When wide
+display is off, on the other hand, 23 specials will fit in 80 colums,
+but 100% probabilities can mess up the table formatting.</para>
 </refsect1>
 
 <refsect1 id='author'><title>AUTHOR</title>
-<para>Eric S. Raymond &lt;esr@snark.thyrsus.com&gt;.  Based on the
+<para>Eric S. Raymond <email>esr@snark.thyrsus.com</email>.  Based on the
 `cardprobs' program by Jeremy York.  See my home page at <ulink
-url='http://www.tuxedo.org/~esr'>http://www.tuxedo.org/~esr</ulink>
+url='http://www.catb.org/~esr'>http://www.catb.org/~esr</ulink>
 for updates and other resources.</para>
 </refsect1>