[Debian-astro-commits] [iraf] 04/04: Separate NOAO and development (softools) packages

Ole Streicher olebole at moszumanska.debian.org
Sun Nov 26 13:58:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch master
in repository iraf.

commit 6161135d392409687fca6f498e478b14118bc9ee
Author: Ole Streicher <olebole at debian.org>
Date:   Sun Nov 26 14:46:16 2017 +0100

    Separate NOAO and development (softools) packages
---
 debian/README.Debian                               |  17 +--
 debian/TODO                                        |  24 ----
 .../Make-the-installation-FHS-conform.patch        | 155 +++------------------
 .../patches/Separate-NOAO-and-dev-packages.patch   | 133 ++++++++++++++++++
 debian/patches/series                              |   1 +
 5 files changed, 156 insertions(+), 174 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 260cd88..bbdb1da 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -6,31 +6,22 @@ the IRAF github repository https://github.com/iraf/iraf-v216
 
 Debian specific adoptions made in the Debian package include:
 
-* The directory structur is changed according to the FHS and the
-  freedesktop.org recommendations:
+* The directory structur is changed according to the FHS
 
     /usr/share/iraf/                 - IRAF root dir ($iraf)
-    /usr/lib/<arch>/iraf/            - Binaries and libs ($ibin, $hbin)
-    ${HOME}/.cache/iraf/             - Cache directory ($cachedir)
-    ${HOME}/.share/local/iraf/imdir/ - Images directory ($imdir)
+    /usr/lib/iraf/                   - Binaries and libs ($bin, $hbin)
+    /etc/iraf/login.cl		     - Default login script
 
 * Since many IRAF development commands conflict with commands from
   other packages, they are not in /usr/bin/, but in
   /usr/lib/iraf/bin. You may prepend this directory to the PATH
-  environment variable if you need to use them directly. This may be
-  done by sourcing /usr/share/iraf/unix/hlib/setup.sh. Include the
-  following lines in your ~/.bashrc to make this permanent:
-
-      if [ -e /usr/share/iraf/unix/hlib/setup.sh ] ; then
-          source /usr/share/iraf/unix/hlib/setup.sh
-      fi
+  environment variable if you need to use them directly.
 
 * The user commands are installed in /usr/bin/, but cl/ecl had to be
   renamed to "irafcl". If your source setup.sh as described above, cl
   and ecl aliases are created as well.
 
      irafcl                  - starts IRAF ecl in the current window
-     mkiraf                  - setup the IRAF environment for a user
      sgidispatch	     - execute named sgi translator
 
 * Different from the original binary distributions, the source code is
diff --git a/debian/TODO b/debian/TODO
index b9ee861..c61ef5f 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,22 +1,3 @@
-
-* implement directory structure as described in README
-
-    $ibin:  $iraf/bin.$arch/      --> /usr/lib/$archtriplet/iraf/
-    $hbin:  $iraf/unix/bin.$arch/ --> /usr/lib/$archtriplet/iraf/unix/
-    $nbin:  $iraf/noao/bin.$arch/ --> /usr/lib/$archtriplet/iraf/noao/
-
-* symlink all relevant binaries to /usr/lib/iraf/bin/
-
-    iraf-dev                - xc, xyacc, rpp, generic, mkpkg, xpp
-    not (maintenance only)  - rmfiles, mkmlist, rtar, rmbin, wtar
-
-* Prepend /usr/lib/iraf/bin to PATH in irafuser.sh and in all
-  developer commands (so that if one starts, it finds the others).
-   
-* Symlink the user commands to /usr/bin
-
-    iraf-common             - irafcl, mkiraf, sgidispatch
-
 * Add aliases "cl", "ecl" to iraf-cl in setup.sh. Fix "iraf" alias to
   work with xterm as well. Default to xterm terminal.
    
@@ -24,11 +5,6 @@
 
 * Update manpages. Also keep the manpages for IRAF internal commands
 
-* Allow parallel installation of 32-bit binary packages, and let them
-  work nicely together (f.e. for STSCI tables)
-
-* Make user package work without /usr/include/iraf.h
-
 * Strip more unnecessary files (development examples and such) from
   /usr/share/iraf 
 
diff --git a/debian/patches/Make-the-installation-FHS-conform.patch b/debian/patches/Make-the-installation-FHS-conform.patch
index f62e49d..bd0b5ad 100644
--- a/debian/patches/Make-the-installation-FHS-conform.patch
+++ b/debian/patches/Make-the-installation-FHS-conform.patch
@@ -6,18 +6,15 @@ This moves the IRAF installation from /iraf/iraf/ to /usr/share/iraf/, with
 the system dependent files (binaries) in /usr/lib/iraf.
 ---
  noao/lib/zzsetenv.def  |  4 ++--
- pkg/cl/main.c          | 14 +++++++++++++-
- pkg/ecl/main.c         | 14 +++++++++++++-
- unix/hlib/clpackage.cl |  5 +++--
- unix/hlib/extern.pkg   | 34 ++++++++++++++++++++++------------
- unix/hlib/extpkg.cl    |  2 +-
- unix/hlib/login.cl     | 32 ++++++++++++++++++--------------
- unix/hlib/zzsetenv.def |  4 ++--
+ pkg/cl/main.c          | 12 +++++++++++-
+ pkg/ecl/main.c         | 12 +++++++++++-
+ unix/hlib/login.cl     | 23 ++++++++++++-----------
+ unix/hlib/zzsetenv.def |  3 ++-
  unix/os/irafpath.c     | 10 ++++++++++
- 9 files changed, 84 insertions(+), 35 deletions(-)
+ 6 files changed, 48 insertions(+), 16 deletions(-)
 
 diff --git a/noao/lib/zzsetenv.def b/noao/lib/zzsetenv.def
-index c38a4be..da6916a 100644
+index c38a4be..d51ff4c 100644
 --- a/noao/lib/zzsetenv.def
 +++ b/noao/lib/zzsetenv.def
 @@ -1,7 +1,7 @@
@@ -25,24 +22,22 @@ index c38a4be..da6916a 100644
  
 -set	pkglibs		= "noao$bin(arch)/,noao$lib/"
 -set	noaobin		= "noao$bin(arch)/"
-+set	noaobin		= "/usr/lib/iraf/noao/"
-+set	pkglibs		= "noaobin$,noao$lib/"
++set	pkglibs		= "bin$noao/,noao$lib/"
++set	noaobin		= "bin$noao/"
  set	noaolib		= "noao$lib/"
  set	ccdtime		= "noaolib$ccdtime/"
  set	onedstds	= "noaolib$onedstds/"
 diff --git a/pkg/cl/main.c b/pkg/cl/main.c
-index 0471f4c..28e6266 100644
+index 0471f4c..6027bf3 100644
 --- a/pkg/cl/main.c
 +++ b/pkg/cl/main.c
-@@ -491,7 +491,19 @@ login (char *cmd)
+@@ -491,7 +491,17 @@ login (char *cmd)
                  compile (REDIRIN);
                  compile (EXEC);
              } else {
 -                printf ("Warning: no login.cl found in login directory\n");
-+                char *host = envget ("host");
-+
 +                memset (global, 0, SZ_LINE);
-+                sprintf (global, "%shlib/login.cl", host);
++                strcpy (global, "/etc/iraf/login.cl");
 +                if (c_access (global, 0, 0) == YES) {
 +                    o.o_val.v_s = global;
 +                    compile (CALL, "cl");
@@ -56,18 +51,16 @@ index 0471f4c..28e6266 100644
  
  	} else {
 diff --git a/pkg/ecl/main.c b/pkg/ecl/main.c
-index ee1aeae..1a4b27f 100644
+index ee1aeae..7e927c9 100644
 --- a/pkg/ecl/main.c
 +++ b/pkg/ecl/main.c
-@@ -540,7 +540,19 @@ login (char *cmd)
+@@ -540,7 +540,17 @@ login (char *cmd)
                  compile (REDIRIN);
                  compile (EXEC);
              } else {
 -                printf ("Warning: no login.cl found in login directory\n");
-+                char *host = envget ("host");
-+
 +                memset (global, 0, SZ_LINE);
-+                sprintf (global, "%shlib/login.cl", host);
++                strcpy (global, "/etc/iraf/login.cl");
 +                if (c_access (global, 0, 0) == YES) {
 +                    o.o_val.v_s = global;
 +                    compile (CALL, "cl");
@@ -80,96 +73,8 @@ index ee1aeae..1a4b27f 100644
              }
  
  	} else {
-diff --git a/unix/hlib/clpackage.cl b/unix/hlib/clpackage.cl
-index cb017cd..d8121b2 100644
---- a/unix/hlib/clpackage.cl
-+++ b/unix/hlib/clpackage.cl
-@@ -24,7 +24,6 @@ task	lists.pkg	= "lists$lists.cl"
- task	obsolete.pkg	= "obsolete$obsolete.cl"
- task	plot.pkg	= "plot$plot.cl"
- task	proto.pkg	= "proto$proto.cl"
--task	softools.pkg	= "softools$softools.cl"
- task	system.pkg	= "system$system.cl"
- task	utilities.pkg	= "utilities$utilities.cl"
- 
-@@ -46,7 +45,9 @@ if (access ("hlib$extpkg.cl") == yes)
- images
- proto
- utilities
--noao
-+if (deftask ("noao"))
-+   noao
-+;
- 
- # Load the SYSTEM package.  Avoid printing menu, but do not change the
- # default value of the menus switch.
-diff --git a/unix/hlib/extern.pkg b/unix/hlib/extern.pkg
-index 5afbabf..f29bbc5 100644
---- a/unix/hlib/extern.pkg
-+++ b/unix/hlib/extern.pkg
-@@ -4,12 +4,21 @@
- 
- reset	extern		= iraf$extern/
- 
--reset	noao		= iraf$noao/
--task	noao.pkg	= noao$noao.cl
--
--reset	vo		= iraf$vo/
--task	vo.pkg		= vo$vo.cl
--
-+if (access ("pkg$softools/softools.cl") == yes) {
-+    reset	softools	= pkg$softools/
-+    task	softools.pkg	= softools$softools.cl
-+}
-+;
-+if (access ("iraf$noao/noao.cl") == yes) {
-+    reset	noao		= iraf$noao/
-+    task	noao.pkg	= noao$noao.cl
-+}
-+;
-+if (access ("iraf$vo/vo.cl") == yes) {
-+    reset	vo		= iraf$vo/
-+    task	vo.pkg		= vo$vo.cl
-+}
-+;
- #reset	local		= iraf$local/
- #task	local.pkg	= local$local.cl
- 
-@@ -29,12 +38,13 @@ task	vo.pkg		= vo$vo.cl
- 
- # Initialize the helpdb string.  We'll add to this when dyanamically 
- # loading packages when the next load the CLPACKAGE.
--reset	helpdb		= "lib$helpdb.mip\
--			  ,noao$lib/helpdb.mip\
--			  ,vo$lib/helpdb.mip\
--#			  ,example$lib/helpdb.mip\
--			  "
--
-+reset	helpdb		= "lib$helpdb.mip"
-+if (access("noao$lib/helpdb.mip") == yes)
-+    reset	helpdb	= (envget("helpdb") // ",noao$lib/helpdb.mip")
-+;
-+if (access("vo$lib/helpdb.mip") == yes)
-+    reset	helpdb	= (envget("helpdb") // ",vo$lib/helpdb.mip")
-+;
- 
- # Do not modify below this line!
- clpackage
-diff --git a/unix/hlib/extpkg.cl b/unix/hlib/extpkg.cl
-index 4e8b3a6..40b80e7 100644
---- a/unix/hlib/extpkg.cl
-+++ b/unix/hlib/extpkg.cl
-@@ -23,7 +23,7 @@ dpkg = mktemp ("tmp$dpkg")
- if (access (dpkg) == yes)
-   printf ("!/bin/rm -f %s\n", osfn(dpkg))                              	| cl ()
- ;
--printf ("!/bin/ls -1ad [a-y]*\n") | cl (,> dpkg)
-+printf ("!/bin/ls -1ad [a-y]* 2> /dev/null\n") | cl (,> dpkg)
- 
- list = dpkg
- while (fscan (list, s1) != EOF) {
 diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
-index d30a9d2..4f0f4ed 100644
+index d30a9d2..fb38e08 100644
 --- a/unix/hlib/login.cl
 +++ b/unix/hlib/login.cl
 @@ -4,19 +4,20 @@
@@ -203,33 +108,17 @@ index d30a9d2..4f0f4ed 100644
  
  #============================================================================
  # Uncomment and edit to change the defaults.
-@@ -123,9 +124,12 @@ if (deftask ("proto"))
- 
- tv              # image display
- utilities       # miscellaneous utilities
--noao            # optical astronomy packages
--vo              # Virtual Observatory tools
--
-+if (deftask ("noao"))
-+    noao        # optical astronomy packages
-+;
-+if (deftask ("vo"))
-+    vo          # Virtual Observatory tools
-+;
- prcache directory
- cache   directory page type help
- 
-@@ -142,7 +146,7 @@ else {
+@@ -142,7 +143,7 @@ else {
  # Notify the user if we're using the global login.
  path (".") | scan (s1)
  if ( osfn("home$") != substr (s1, strldx("!",s1)+1, strlen(s1)) ) {
 -    printf ("  ***  Using global login file:  %slogin.cl\n", osfn("home$"))
-+    printf ("  ***  Using global login file:  %slogin.cl\n", osfn("hlib$"))
++    printf ("  ***  Using global login file:  /etc/login.cl\n")
  }
  ;
  
 diff --git a/unix/hlib/zzsetenv.def b/unix/hlib/zzsetenv.def
-index 6527a32..34e5954 100644
+index 6527a32..877fabd 100644
 --- a/unix/hlib/zzsetenv.def
 +++ b/unix/hlib/zzsetenv.def
 @@ -58,8 +58,9 @@ set	version		= "Debian IRAF V2.16.1+"
@@ -243,14 +132,6 @@ index 6527a32..34e5954 100644
  set	boot		= "host$boot/"
  set	dev		= "iraf$dev/"
  set	doc		= "iraf$doc/"
-@@ -107,7 +108,6 @@ set	lists		= "pkg$lists/"
- set	obsolete	= "pkg$obsolete/"
- set	plot		= "pkg$plot/"
- set	proto		= "pkg$proto/"
--set	softools	= "pkg$softools/"
- set	system		= "pkg$system/"
- set	utilities	= "pkg$utilities/"
- set	xtools		= "pkg$xtools/"
 diff --git a/unix/os/irafpath.c b/unix/os/irafpath.c
 index 96e147a..5b4e149 100644
 --- a/unix/os/irafpath.c
diff --git a/debian/patches/Separate-NOAO-and-dev-packages.patch b/debian/patches/Separate-NOAO-and-dev-packages.patch
new file mode 100644
index 0000000..e656c2b
--- /dev/null
+++ b/debian/patches/Separate-NOAO-and-dev-packages.patch
@@ -0,0 +1,133 @@
+From: Ole Streicher <olebole at debian.org>
+Date: Sat, 25 Nov 2017 15:45:49 +0100
+Subject: Separate NOAO and development (softools) packages
+
+This allows to install a "core" IRAF without NOAO and development tools.
+---
+ unix/hlib/clpackage.cl |  5 +++--
+ unix/hlib/extern.pkg   | 34 ++++++++++++++++++++++------------
+ unix/hlib/extpkg.cl    |  2 +-
+ unix/hlib/login.cl     |  9 ++++++---
+ unix/hlib/zzsetenv.def |  1 -
+ 5 files changed, 32 insertions(+), 19 deletions(-)
+
+diff --git a/unix/hlib/clpackage.cl b/unix/hlib/clpackage.cl
+index cb017cd..d8121b2 100644
+--- a/unix/hlib/clpackage.cl
++++ b/unix/hlib/clpackage.cl
+@@ -24,7 +24,6 @@ task	lists.pkg	= "lists$lists.cl"
+ task	obsolete.pkg	= "obsolete$obsolete.cl"
+ task	plot.pkg	= "plot$plot.cl"
+ task	proto.pkg	= "proto$proto.cl"
+-task	softools.pkg	= "softools$softools.cl"
+ task	system.pkg	= "system$system.cl"
+ task	utilities.pkg	= "utilities$utilities.cl"
+ 
+@@ -46,7 +45,9 @@ if (access ("hlib$extpkg.cl") == yes)
+ images
+ proto
+ utilities
+-noao
++if (deftask ("noao"))
++   noao
++;
+ 
+ # Load the SYSTEM package.  Avoid printing menu, but do not change the
+ # default value of the menus switch.
+diff --git a/unix/hlib/extern.pkg b/unix/hlib/extern.pkg
+index 5afbabf..f29bbc5 100644
+--- a/unix/hlib/extern.pkg
++++ b/unix/hlib/extern.pkg
+@@ -4,12 +4,21 @@
+ 
+ reset	extern		= iraf$extern/
+ 
+-reset	noao		= iraf$noao/
+-task	noao.pkg	= noao$noao.cl
+-
+-reset	vo		= iraf$vo/
+-task	vo.pkg		= vo$vo.cl
+-
++if (access ("pkg$softools/softools.cl") == yes) {
++    reset	softools	= pkg$softools/
++    task	softools.pkg	= softools$softools.cl
++}
++;
++if (access ("iraf$noao/noao.cl") == yes) {
++    reset	noao		= iraf$noao/
++    task	noao.pkg	= noao$noao.cl
++}
++;
++if (access ("iraf$vo/vo.cl") == yes) {
++    reset	vo		= iraf$vo/
++    task	vo.pkg		= vo$vo.cl
++}
++;
+ #reset	local		= iraf$local/
+ #task	local.pkg	= local$local.cl
+ 
+@@ -29,12 +38,13 @@ task	vo.pkg		= vo$vo.cl
+ 
+ # Initialize the helpdb string.  We'll add to this when dyanamically 
+ # loading packages when the next load the CLPACKAGE.
+-reset	helpdb		= "lib$helpdb.mip\
+-			  ,noao$lib/helpdb.mip\
+-			  ,vo$lib/helpdb.mip\
+-#			  ,example$lib/helpdb.mip\
+-			  "
+-
++reset	helpdb		= "lib$helpdb.mip"
++if (access("noao$lib/helpdb.mip") == yes)
++    reset	helpdb	= (envget("helpdb") // ",noao$lib/helpdb.mip")
++;
++if (access("vo$lib/helpdb.mip") == yes)
++    reset	helpdb	= (envget("helpdb") // ",vo$lib/helpdb.mip")
++;
+ 
+ # Do not modify below this line!
+ clpackage
+diff --git a/unix/hlib/extpkg.cl b/unix/hlib/extpkg.cl
+index 4e8b3a6..40b80e7 100644
+--- a/unix/hlib/extpkg.cl
++++ b/unix/hlib/extpkg.cl
+@@ -23,7 +23,7 @@ dpkg = mktemp ("tmp$dpkg")
+ if (access (dpkg) == yes)
+   printf ("!/bin/rm -f %s\n", osfn(dpkg))                              	| cl ()
+ ;
+-printf ("!/bin/ls -1ad [a-y]*\n") | cl (,> dpkg)
++printf ("!/bin/ls -1ad [a-y]* 2> /dev/null\n") | cl (,> dpkg)
+ 
+ list = dpkg
+ while (fscan (list, s1) != EOF) {
+diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
+index fb38e08..b0ad230 100644
+--- a/unix/hlib/login.cl
++++ b/unix/hlib/login.cl
+@@ -124,9 +124,12 @@ if (deftask ("proto"))
+ 
+ tv              # image display
+ utilities       # miscellaneous utilities
+-noao            # optical astronomy packages
+-vo              # Virtual Observatory tools
+-
++if (deftask ("noao"))
++    noao        # optical astronomy packages
++;
++if (deftask ("vo"))
++    vo          # Virtual Observatory tools
++;
+ prcache directory
+ cache   directory page type help
+ 
+diff --git a/unix/hlib/zzsetenv.def b/unix/hlib/zzsetenv.def
+index 877fabd..34e5954 100644
+--- a/unix/hlib/zzsetenv.def
++++ b/unix/hlib/zzsetenv.def
+@@ -108,7 +108,6 @@ set	lists		= "pkg$lists/"
+ set	obsolete	= "pkg$obsolete/"
+ set	plot		= "pkg$plot/"
+ set	proto		= "pkg$proto/"
+-set	softools	= "pkg$softools/"
+ set	system		= "pkg$system/"
+ set	utilities	= "pkg$utilities/"
+ set	xtools		= "pkg$xtools/"
diff --git a/debian/patches/series b/debian/patches/series
index 6e12920..e5cdbae 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ Allow-plus-sign-in-build-path.patch
 Fix-f77-script.patch
 Don-t-call-back-home-on-start.patch
 Make-the-installation-FHS-conform.patch
+Separate-NOAO-and-dev-packages.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/iraf.git



More information about the Debian-astro-commits mailing list