Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2008-06-02 00:45:16
Size: 359
Comment: initial version
Revision 6 as of 2008-12-22 22:14:27
Size: 1470
Editor: was
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= ToDo = = Here is how to check that an spkg is correctly formatted =
Line 3: Line 3:
There are usually a number of things to do for all spkgs, but none of them by == First the directory structure ==
{{{
  src/ -- *vanilla* upstream
  SPKG.txt -- describes the spkg in wiki format, each new revision
needs an updated changelog entry or an automatic "needs work" from my
end at review time
  spkg-install -- the install script
  spkg-check -- runs the test suite - this is somewhat optional since
not all spkgs have test suites
  patches -- for patches against upstream. Each file
foo.extension needs to have a diff against the original file, i.e.
foo.extension.patch for easy rebases against new upstream
}}}


There are usually a number of things to do for all spkgs:
Line 12: Line 27:

= A Sample spkg-install =
{{{
#!/usr/bin/env bash

if [ "$SAGE_LOCAL" = "" ]; then
   echo "SAGE_LOCAL undefined ... exiting";
   echo "Maybe run 'sage -sh'?"
   exit 1
fi

cd src

./configure --prefix="$SAGE_LOCAL"
if [ $? -ne 0 ]; then
   echo "Error configuring PACKAGE_NAME."
   exit 1
fi

make
if [ $? -ne 0 ]; then
   echo "Error building PACKAGE_NAME."
   exit 1
fi

make install
if [ $? -ne 0 ]; then
   echo "Error installing PACKAGE_NAME."
   exit 1
fi
}}}

Here is how to check that an spkg is correctly formatted

First the directory structure

  src/            -- *vanilla* upstream
  SPKG.txt   -- describes the spkg in wiki format, each new revision
needs an updated changelog entry or an automatic "needs work" from my
end at review time
  spkg-install  -- the install script
  spkg-check -- runs the test suite - this is somewhat optional since
not all spkgs have test suites
  patches      -- for patches against upstream. Each file
foo.extension needs to have a diff against the original file, i.e.
foo.extension.patch for easy rebases against new upstream

There are usually a number of things to do for all spkgs:

  • ensure that "make install" is non-parallel, i.e. do a "export MAKE=make"
  • SAGE_LOCAL check (#633)
  • add spkg-check (#299)
  • add proper SPKG.txt to all packages
  • /usr/bin/env bash (#1638)
  • add md5sums for spkgs (#329)
  • set LDFLAGS on OSX (#3349)

A Sample spkg-install

if [ "$SAGE_LOCAL" = "" ]; then
   echo "SAGE_LOCAL undefined ... exiting";
   echo "Maybe run 'sage -sh'?"
   exit 1
fi

cd src

./configure --prefix="$SAGE_LOCAL"
if [ $? -ne 0 ]; then
   echo "Error configuring PACKAGE_NAME."
   exit 1
fi

make
if [ $? -ne 0 ]; then
   echo "Error building PACKAGE_NAME."
   exit 1
fi

make install
if [ $? -ne 0 ]; then
   echo "Error installing PACKAGE_NAME."
   exit 1
fi