#20136: Various meataxe build issues
-------------------------------------------------+-------------------------
       Reporter:  jdemeyer                       |        Owner:
           Type:  defect                         |       Status:  new
       Priority:  major                          |    Milestone:  sage-7.1
      Component:  packages: optional             |   Resolution:
       Keywords:                                 |    Merged in:
        Authors:                                 |    Reviewers:
Report Upstream:  Reported upstream. Developers  |  Work issues:
  acknowledge bug.                               |       Commit:
         Branch:                                 |     Stopgaps:
   Dependencies:                                 |
-------------------------------------------------+-------------------------

Comment (by SimonKing):

 Replying to [comment:33 jdemeyer]:
 > I would advise against that, since `spkg-src` is not only a script but
 also serves as some kind of documentation of how the tarball was obtained.
 With that in mind, it's best if `spkg-src` is completely self-contained.

 Then I suggest `spkg-src` be the following:
 {{{
 #!/usr/bin/env bash

 COMMIT=7c0bcf9

 git clone https://github.com/momtx/meataxe.git
 cd meataxe
 git checkout -b package $COMMIT
 git apply ../spkg-src
 git commit -a -m "Add make target *dist*"
 sed -i 's/-SNAPSHOT/.'$COMMIT'/' Makefile
 make dist
 cd ..
 mv meataxe/meataxe-2.5.0.$COMMIT.tar.gz .
 rm -rf meataxe
 exit 0

 ########################################

 diff --git a/Makefile b/Makefile
 index 935964b..49c2b86 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -221,7 +221,7 @@ tmp/test-%.done: tests/common.sh tests/%/run
 $(PROGRAMS:%=${MTXBIN}/%)
         @touch "$@"


 -.PHONY: tar clean install test
 +.PHONY: tar dist clean install test
  .PRECIOUS: tmp/%.o


 @@ -264,6 +264,8 @@ EXPORTED_FILES =\
    Makefile README.md COPYING\
    src/meataxe.doc src/changelog.doc\

 +TESTS = tests
 +
  tar: all doc
         rm -f meataxe-${MTXVERSION} meataxe-${MTXVERSION}.tar
 meataxe-${MTXVERSION}.tar.gz \
         && ln -s . meataxe-${MTXVERSION} \
 @@ -271,3 +273,11 @@ tar: all doc
         && rm meataxe-${MTXVERSION} \
         && gzip meataxe-${MTXVERSION}.tar \
         && echo "Created meataxe-${MTXVERSION}.tar.gz"
 +
 +dist: all doc
 +       rm -f meataxe-${MTXVERSION} meataxe-${MTXVERSION}.tar
 meataxe-${MTXVERSION}.tar.gz \
 +       && ln -s . meataxe-${MTXVERSION} \
 +       && tar cf meataxe-${MTXVERSION}.tar
 $(EXPORTED_FILES:%=meataxe-${MTXVERSION}/%) meataxe-${MTXVERSION}/${TESTS}
 \
 +       && rm meataxe-${MTXVERSION} \
 +       && gzip meataxe-${MTXVERSION}.tar \
 +       && echo "Created meataxe-${MTXVERSION}.tar.gz including tests"
 --
 2.5.0
 }}}
 It provides the concrete commit of the snapshot, adds a `make dist` target
 that includes the test suite into the tarball, makes it so that the
 version number provides the concrete commit, creates the tar ball, and
 removes the temporary meataxe repository.

 The only assumption is that the script is executed in the same directory
 in which it is stored, since it serves as a diff file to be applied to the
 Makefile.

--
Ticket URL: <http://trac.sagemath.org/ticket/20136#comment:34>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to