[med-svn] [Git][med-team/ampl-netlib-solvers][master] 2 commits: Revert changes that should not be commited

Andreas Tille gitlab at salsa.debian.org
Wed Sep 30 13:22:40 BST 2020



Andreas Tille pushed to branch master at Debian Med / ampl-netlib-solvers


Commits:
02156153 by Andreas Tille at 2020-09-30T13:08:08+02:00
Revert changes that should not be commited

- - - - -
fc966e71 by Andreas Tille at 2020-09-30T14:14:08+02:00
Create two binary packages and use d-shlibs to feed these

- - - - -


6 changed files:

- − debian/ampl-netlib-solvers.install
- debian/control
- + debian/libamplsolver-dev.install
- debian/patches/fix-makefile-shared-lib.patch
- debian/rules
- makefile.u


Changes:

=====================================
debian/ampl-netlib-solvers.install deleted
=====================================
@@ -1,4 +0,0 @@
-#! /usr/bin/dh-exec
-sys.*/*.so*	usr/lib/${DEB_HOST_MULTIARCH}/
-sys.*/*.a	usr/lib/${DEB_HOST_MULTIARCH}/
-sys.*/*.h	usr/include/ampl-netlib-solvers/


=====================================
debian/control
=====================================
@@ -4,14 +4,15 @@ Uploaders: Andrei Rozanski <rozanski.andrei at gmail.com>
 Section: science
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
-               dh-exec
+               d-shlibs
 Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/med-team/ampl-netlib-solvers
 Vcs-Git: https://salsa.debian.org/med-team/ampl-netlib-solvers.git
 Homepage: https://ampl.com/netlib/ampl/
 Rules-Requires-Root: no
 
-Package: ampl-netlib-solvers
+Package: libamplsolver0
+Section: libs
 Architecture: any
 Depends: ${shlibs:Depends},
          ${misc:Depends}
@@ -20,3 +21,19 @@ Description: library of routines that help solvers work with AMPL
  and system for formulating, solving, and helping understand mathematical
  programming problems (of minimizing or maximizing a function subject to
  constraints).
+ .
+ This package contains the shared library.
+
+Package: libamplsolver-dev
+Section: libdevel
+Architecture: any
+Depends: libamplsolver0 (= ${binary:Version}),
+         ${shlibs:Depends},
+         ${misc:Depends}
+Description: library of routines that help solvers work with AMPL (devel)
+ Library of routines that help solvers work with AMPL. AMPL is a language
+ and system for formulating, solving, and helping understand mathematical
+ programming problems (of minimizing or maximizing a function subject to
+ constraints).
+ .
+ This package contains the header files and static library.


=====================================
debian/libamplsolver-dev.install
=====================================
@@ -0,0 +1 @@
+sys.*/*.h	usr/include/ampl-netlib-solvers/


=====================================
debian/patches/fix-makefile-shared-lib.patch
=====================================
@@ -15,7 +15,7 @@ Description: fix makefile.u in order to get libamplsover.so
  
  # Add -DNO_RUSAGE to the CFLAGS assignment if your system
  # lacks getrusage().  This only matters for compiling xectim.c.
-@@ -86,7 +87,7 @@
+@@ -86,7 +87,7 @@ SHELL=/bin/sh
  .c.o:
  	$(CC) -c $(CFLAGS) $*.c
  
@@ -24,13 +24,14 @@ Description: fix makefile.u in order to get libamplsover.so
  
  a = \
  	asldate.c \
-@@ -181,6 +182,10 @@
+@@ -181,6 +182,11 @@ a = \
  	xp2known.c
  
  ARFLAGS = ruv
 +
 +libamplsolver.so: $(OFILES)
-+	$(CC) $^ -shared -o $@
++	$(CC) $^ -shared  -Wl,-soname,libamplsolver.so.0 -o $@.0
++	ln -s $@.0 $@
 +
  amplsolver.a: $a
  	$(CC) -c $(CFLAGS) $?


=====================================
debian/rules
=====================================
@@ -7,31 +7,20 @@ AMPL_FILE:=$(shell find ./ -name amplsolver.a)
 REN_AMPL_FILE:=$(addsuffix libamplsolver.a,$(dir $(AMPL_FILE)))
 
 include /usr/share/dpkg/default.mk
-# this provides:
-# DEB_SOURCE: the source package name
-# DEB_VERSION: the full version of the package (epoch + upstream vers. + revision)
-# DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian revision
-# DEB_VERSION_UPSTREAM_REVISION: the package's version without the Debian epoch
-# DEB_VERSION_UPSTREAM: the package's upstream version
-# DEB_DISTRIBUTION: the distribution(s) listed in the current entry of debian/changelog
-# SOURCE_DATE_EPOCH: the source release date as seconds since the epoch, as
-#                    specified by <https://reproducible-builds.org/specs/source-date-epoch/>
 
 # for hardening you might like to uncomment this:
-# export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 %:
 	dh $@
 
-### When overriding auto_test make sure DEB_BUILD_OPTIONS will be respected
-#override_dh_auto_test:
-#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-#	do_stuff_for_testing
-#endif
-
 override_dh_install:
 	mv $(AMPL_FILE) $(REN_AMPL_FILE)
 	dh_install
+	d-shlibmove --commit \
+		    --multiarch \
+		    --devunversioned \
+                    sys.*/*.so
 
 get-orig-source:
 	. debian/get-orig-source


=====================================
makefile.u
=====================================
@@ -26,9 +26,8 @@
 
 .SUFFIXES: .c .o
 CC = cc
-CFLAGS := $(CFLAGS) -pipe -DASL_BUILD -fPIC -DPIC
+CFLAGS = -O
 SHELL=/bin/sh
-OFILES=$(addsuffix .o,$(basename $(a)))
 
 # Add -DNO_RUSAGE to the CFLAGS assignment if your system
 # lacks getrusage().  This only matters for compiling xectim.c.
@@ -87,7 +86,7 @@ OFILES=$(addsuffix .o,$(basename $(a)))
 .c.o:
 	$(CC) -c $(CFLAGS) $*.c
 
-all: arith.h stdio1.h amplsolver.a funcadd0.o libamplsolver.so
+all: arith.h stdio1.h amplsolver.a funcadd0.o
 
 a = \
 	asldate.c \
@@ -182,10 +181,6 @@ a = \
 	xp2known.c
 
 ARFLAGS = ruv
-
-libamplsolver.so: $(OFILES)
-	$(CC) $^ -shared -o $@
-
 amplsolver.a: $a
 	$(CC) -c $(CFLAGS) $?
 	x=`echo $? | sed 's/\.[cs]/.o/g'` && ar $(ARFLAGS) amplsolver.a $$x && rm $$x



View it on GitLab: https://salsa.debian.org/med-team/ampl-netlib-solvers/-/compare/27f2b7921ccc764634fa0b3426507b54485ea195...fc966e71d71ba21509c6a550adbe569fc3307027

-- 
View it on GitLab: https://salsa.debian.org/med-team/ampl-netlib-solvers/-/compare/27f2b7921ccc764634fa0b3426507b54485ea195...fc966e71d71ba21509c6a550adbe569fc3307027
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200930/522edb70/attachment-0001.html>


More information about the debian-med-commit mailing list