File: debianization.patch

package info (click to toggle)
singular 1:4.1.1-p2+ds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 35,860 kB
  • sloc: cpp: 288,280; ansic: 17,387; lisp: 4,242; yacc: 1,654; python: 1,608; makefile: 1,424; lex: 1,387; perl: 632; sh: 567; xml: 182
file content (300 lines) | stat: -rw-r--r-- 9,011 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
Description: debianization
 Meant to maintain a minimal debian/rules, to fix warnings,
 to address Debian specific stuff in general.
Origin: vendor, Debian
Forwarded: not-needed
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2018-02-24

--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@
 SUBDIRS = resources omalloc $(USE_FACTORY) \
 libpolys gfanlib IntegerProgramming \
 kernel Singular \
-dox emacs redhat desktop
+dox emacs desktop
 
 EXTRA_DIST = README README.md README.pkg autogen.sh git-version-gen doxy redhat/singular.spec.in GPL2 GPL3 doc/doc.tbz2
 
@@ -39,7 +39,7 @@
 uninstall-local:
 	-(cd $(DESTDIR)$(datadir); rm -rf singular info/singular.hlp)
 
-configheaderdir = ${includedir}/singular
+configheaderdir = ${includedir}/$(DEB_HOST_MULTIARCH)/singular
 nodist_configheader_HEADERS = singularconfig.h
 DISTCLEANFILES = $(nodist_configheader_HEADERS)
 
--- a/libpolys/Makefile.am
+++ b/libpolys/Makefile.am
@@ -15,7 +15,7 @@
 
 SUBDIRS=misc reporter coeffs polys tests
 
-configheaderdir = ${includedir}/singular
+configheaderdir = ${includedir}/$(DEB_HOST_MULTIARCH)/singular
 nodist_configheader_HEADERS = libpolysconfig.h
 DISTCLEANFILES = $(nodist_configheader_HEADERS)
 
--- a/omalloc/Makefile.am
+++ b/omalloc/Makefile.am
@@ -2,6 +2,7 @@
 
 lib_LTLIBRARIES=libomalloc.la
 
+configheaderdir = ${includedir}/$(DEB_HOST_MULTIARCH)/omalloc
 libomalloc_includedir=$(includedir)/omalloc
 
 libomalloc_include_HEADERS = \
@@ -33,7 +34,8 @@
 libomalloc_la_LDFLAGS    = $(SINGULAR_LDFLAGS) -release ${PACKAGE_VERSION}
 
 nodist_libomalloc_la_SOURCES = omTables.inc omTables.h
-nodist_libomalloc_include_HEADERS = omConfig.h omTables.h
+nodist_configheader_HEADERS = omConfig.h
+nodist_libomalloc_include_HEADERS = omTables.h
 
 libomalloc_la_CPPFLAGS  = ${AM_CPPFLAGS} -DOM_ALLOC_INTERNAL
 
--- a/resources/Makefile.am
+++ b/resources/Makefile.am
@@ -13,6 +13,7 @@
 
 libsingular_resources_la_LDFLAGS   = $(SINGULAR_LDFLAGS) -release ${PACKAGE_VERSION}
 
+configheaderdir = $(includedir)/$(DEB_HOST_MULTIARCH)/resources
 libsingular_resources_includedir  =$(includedir)/resources
 
 libsingular_resources_include_HEADERS = omFindExec.h feResource.h feFopen.h
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@
 AM_MAINTAINER_MODE([enable])
 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
 
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 
 dnl Check if build env is sane
 AM_SANITY_CHECK
@@ -111,6 +111,8 @@
 
 SING_WIN_FLAGS
 
+AC_SUBST(DEB_HOST_MULTIARCH)
+
 PKG_REQUIRE="$PKG_REQUIRE"
 AC_SUBST(PKG_REQUIRE)
 
@@ -214,7 +216,7 @@
 
 AC_CONFIG_SUBDIRS([resources])
 AC_CONFIG_SUBDIRS([omalloc])
-AC_CONFIG_SUBDIRS([xalloc])
+##AC_CONFIG_SUBDIRS([xalloc])
 
 if test "x$ENABLE_FACTORY" = xyes; then
  AC_CONFIG_SUBDIRS([factory])
@@ -260,8 +262,6 @@
 
 AC_CONFIG_FILES([emacs/Makefile])
 
-AC_CONFIG_FILES([redhat/Makefile])
-AC_CONFIG_FILES([redhat/singular.spec])
 AC_CONFIG_FILES([desktop/Makefile desktop/Singular.desktop desktop/Singular-manual.desktop])
 
 AC_OUTPUT
--- a/libpolys/configure.ac
+++ b/libpolys/configure.ac
@@ -8,7 +8,7 @@
 AM_MAINTAINER_MODE([enable])
 
 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 
 dnl Check if build env is sane
@@ -93,6 +93,8 @@
 dnl esac
 dnl AC_SUBST(INCLUDES)
 
+AC_SUBST(DEB_HOST_MULTIARCH)
+
 SING_CHECK_OMALLOC()
 
 ENABLE_RESOURCES="yes"
--- a/resources/configure.ac
+++ b/resources/configure.ac
@@ -7,7 +7,7 @@
 
 AM_MAINTAINER_MODE([enable])
 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 
 dnl Check if build env is sane
@@ -43,6 +43,8 @@
 # ([shared])
 # LT_INIT([win32-dll])(dlopen disable-static) # doesn't work on PowerPC!
 
+AC_SUBST(DEB_HOST_MULTIARCH)
+
 # SING_CHECK_PIPE
 
 SING_WIN_FLAGS
--- a/factory/configure.ac
+++ b/factory/configure.ac
@@ -19,7 +19,7 @@
 AC_CONFIG_HEADER([_config.h])
 
 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 
 AM_MAINTAINER_MODE([enable])
@@ -98,6 +98,8 @@
   ,
   [with_Singular=yes])
 
+AC_SUBST(DEB_HOST_MULTIARCH)
+
 PKG_REQUIRE="$PKG_REQUIRE"
 AC_SUBST(PKG_REQUIRE)
 
--- a/omalloc/configure.ac
+++ b/omalloc/configure.ac
@@ -22,10 +22,12 @@
 
 AM_MAINTAINER_MODE([enable])
 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 
 AM_SANITY_CHECK
 
+AC_SUBST(DEB_HOST_MULTIARCH)
+
 # Add pre'prefixed config
 AX_PREFIX_CONFIG_H([omConfig.h],[],[_config.h])
 
--- a/gfanlib/configure.ac
+++ b/gfanlib/configure.ac
@@ -9,7 +9,7 @@
 AC_CONFIG_HEADER([_config.h])
 
 AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 
 # Add pre'prefixed config
--- a/Singular/Makefile.am
+++ b/Singular/Makefile.am
@@ -6,6 +6,8 @@
 
 all-local: feOpt.inc feOptTS.inc feOptES.inc iparith.inc all.lib gftables MOD ${abs_builddir}/LIB Singular$(EXEEXT) ESingular$(EXEEXT) TSingular$(EXEEXT)
 
+AM_CPPFLAGS += -DDEB_PKG_VERSION=\"$(DEB_PKG_VERSION)\"
+
 if SING_WIN
 SUBDIRS = ${BUILTIN_MODULES} . dyn_modules
 else
@@ -184,7 +186,7 @@
 
 Singular_LDADD = libSingular.la ${BUILTIN_FLAGS}
 
-Singular_LDFLAGS = -static ${AM_LDFLAGS} ${BUILTIN_FLAGS}
+Singular_LDFLAGS = ${AM_LDFLAGS} ${BUILTIN_FLAGS}
 
 Singulard_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc  utils.h
 
@@ -197,7 +199,7 @@
 
 #### ESingular
 ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR -DPROTO
-# ESingular_LDFLAGS = -static ${AM_LDFLAGS}
+# ESingular_LDFLAGS = ${AM_LDFLAGS}
 ESingular_LDADD =  ${top_builddir}/libpolys/reporter/libreporter.la \
 ${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \
 ${top_builddir}/resources/libsingular_resources.la
@@ -207,7 +209,7 @@
 
 #### same for TSingular
 TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR -DPROTO
-# TSingular_LDFLAGS = -static ${AM_LDFLAGS}
+# TSingular_LDFLAGS = ${AM_LDFLAGS}
 TSingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \
 ${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \
 ${top_builddir}/resources/libsingular_resources.la
@@ -222,7 +224,7 @@
 libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc  utils.h
 
 libparse_LDADD = ${top_builddir}/omalloc/libomalloc.la
-libparse_LDFLAGS = -static ${AM_LDFLAGS}
+libparse_LDFLAGS = ${AM_LDFLAGS}
 
 %.1: %
 	$(HELP2MAN) \
--- a/Singular/tesths.cc
+++ b/Singular/tesths.cc
@@ -136,7 +136,7 @@
 " A Computer Algebra System for Polynomial Computations       /   version %s\n"
 "                                                           0<\n"
 " by: W. Decker, G.-M. Greuel, G. Pfister, H. Schoenemann     \\   %s\n"
-"FB Mathematik der Universitaet, D-67653 Kaiserslautern        \\\n"
+"FB Mathematik der Universitaet, D-67653 Kaiserslautern        \\  Debian " DEB_PKG_VERSION "\n"
 , VERSION, VERSION_DATE);
   if (feOptValue(FE_OPT_NO_SHELL)) WarnS("running in restricted mode:"
     " shell invocation and links are disallowed");
--- a/git-version-gen
+++ b/git-version-gen
@@ -1,24 +1,6 @@
-#!/bin/bash
-
-export GIT_WORK_TREE=`dirname "$0"`
-export GIT_DIR="$GIT_WORK_TREE/.git"
-
-## :'%h on %ci by %an: "%s"' --abbrev-commit | sed 's/\"/\\\"/g'
-if [ -d "$GIT_WORK_TREE/.git" ] && v=`git log --pretty=format:'%h' --abbrev-commit -1 2>/dev/null` ;
-then
- if dirty=`sh -c "git diff-index --name-status HEAD 2>/dev/null | sed -e 's|^\([A-Z]\).*|\1|g' | tr -d '\012'"` && [ -n "$dirty" ];
- then
-   echo -n "$v|$dirty"
- else
-   echo -n "$v"
- fi
-# exit 0
-else
- F="$1"
- if [ -r "$F" ];
- then
-   cat "$F"
- else
-   echo -n "UNKNOWN_GIT_VERSION"
- fi
-fi
+#!/bin/sh
+TOP_BUIDDIR=$(dirname $0)
+DEB_PKG_VERSION=$(dpkg-parsechangelog -l${TOP_BUIDDIR}/debian/changelog -S Version)
+echo -n "debian-${DEB_PKG_VERSION}"
+exit 0
+## eos
--- a/factory/Makefile.am
+++ b/factory/Makefile.am
@@ -169,9 +169,11 @@
 
 noinst_HEADERS = $(factory_headers)
 
+configheaderdir = ${includedir}/$(DEB_HOST_MULTIARCH)/factory
 libfactory_includedir = ${includedir}/factory
 
-nodist_libfactory_include_HEADERS = factory.h factoryconf.h
+nodist_configheader_HEADERS = factoryconf.h
+nodist_libfactory_include_HEADERS = factory.h
 
 
 ####################################################