Import Upstream version 0.104

This commit is contained in:
su-fang 2022-09-27 19:16:22 +08:00
commit 1ed276e9ed
9 changed files with 1523 additions and 0 deletions

340
COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

290
ChangeLog Normal file
View File

@ -0,0 +1,290 @@
2008-07-24 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: libpthread-stubs0-dev is handled specially for
hurd, it is in libc package and no extra dependency info is
required.
2008-02-27 Junichi Uekawa <dancer@debian.org>
* d-shlibmove: support uppercase libnames to package names.
2007-09-04 Junichi Uekawa <dancer@debian.org>
* d-shlibmove:
* d-shlibmove.1: -ldb
* d-devlibdeps: libgd2-dev -> libgd-dev
2007-03-29 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: support libgthread and libxml2-dev
2006-08-03 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: support gtk/glib/etc libs.
2006-07-31 Junichi Uekawa <dancer@debian.org>
* d-shlibmove.1: --override.
$ d-shlibmove --override s/zlib/libY/ /usr/lib/libxml2.so
Library package automatic movement utility
DEBUG: -es/zlib/libY/
devlibs error: There is no package matching [libY1g-dev] and noone provides it, please report bug to d-shlibs maintainer
--> libc6-dev package exists.
$ d-shlibmove --override s/zlib/libY/ --override s/libY/libQ/ /usr/lib/libxml2.so
Library package automatic movement utility
DEBUG: -es/zlib/libY/
DEBUG: -es/zlib/libY/ -es/libY/libQ/
devlibs error: There is no package matching [libQ1g-dev] and noone provides it, please report bug to d-shlibs maintainer
--> libc6-dev package exists
* d-shlibmove: --override option support.
* d-devlibdeps: --override option support.
$ ./d-devlibdeps --override s/libc6-dev/libcccc-dev/ /tmp/test /bin/sh
DEBUG: -es/libc6-dev/libcccc-dev/
devlibs error: There is no package matching [libcccc-dev] and noone provides it, please report bug to d-shlibs maintainer
--> libncurses5-dev package exists.
$ ./d-devlibdeps /tmp/test /bin/sh
--> libc6-dev package exists.
--> libncurses5-dev package exists.
* d-devlibdeps.1: document
* d-devlibdeps: OVERRIDE support
2006-07-28 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: add libspeex1-dev->libspeex-dev
2006-07-01 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: add libpthread0.3-dev override for Hurd.
2005-08-30 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: librt1-dev. 325416
2005-05-29 Junichi Uekawa <dancer@debian.org>
* d-shlibmove: add pipefail
* d-devlibdeps: rearrange to check for pipefail status, so that objdump -p failing is noticed.
2005-04-04 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: handle libogg0-dev -> libogg-dev
2004-11-10 Junichi Uekawa <dancer@debian.org>
* d-shlibmove.1: Remove mikilab mail address which was outdated.
* d-devlibdeps.1:
2004-10-02 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: applied patches that are accumulated.
Thanks: Jonas Smedegaard <dr@jones.dk>
Thanks: Robert Millan <rmh@debian.org> (kFreeBSD fixes)
libpthread.*-dev -> libpthread-dev translation might cause breakage on some arches, please watch out.
2004-09-29 Junichi Uekawa <dancer@debian.org>
* Makefile (test-build): Added a testsuite.
2004-08-17 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: Add libcrypt/libnsl for alpha.
2003-07-29 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: map libvorbis-dev
request from Keegan Quinn <ice@thebasement.org>
2003-07-03 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: add libsdl1.2-dev
request from Kalle Olavi Niemitalo <kon@iki.fi>
2003-05-11 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: apply request from Andres Salomon to match
libssl0.9.[67] to libssl-dev.
2003-04-05 Junichi Uekawa <dancer@debian.org>
* Makefile (check): add check target, to check for errors in the
shell scripting.
* d-devlibdeps: little hackish, but ignore package that is going to
be created from the same source package from validate_package
2003-04-02 Junichi Uekawa <dancer@debian.org>
* d-shlibmove (CHECK_ERROR): allow libdevel section.
2003-03-25 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: add libparted1.6
* debian/changelog: Add override from Martin Sj=F6gren,
and merge NMU.
2003-01-30 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: add patch from Jonas Smedegaard <dr@jones.dk>
to support libcrypto
2003-01-27 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps (outputtmp): Add error checking using ERROR_DEVLIB
special symbol inside devlibs.
2003-01-25 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: validate_package function to validate the package.
* d-devlibdeps.1: update and fix description line of manual page.
2003-01-24 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: add override for libgcc_s1-dev,
pointing to nowhere.
2003-01-20 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: patch from Jonas Smedegaard <dr@jones.dk>, bug #177342
2003-01-11 Junichi Uekawa <dancer@debian.org>
* d-shlibmove.1: document the new option.
* d-shlibmove: --c102 option for C++ packages.
Check that it conflicts with non-c102 package.
2002-12-15 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: remove libc-dev reference, since it should be unnecessary
and impossible to guess libc version from other libraries in the libc6 (or
equivalent) package.
2002-11-25 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: Apply patch from Jonas Smedegaard <dr@jones.dk> for Xpm4-dev
2002-10-22 Junichi Uekawa <dancer@debian.org>
* d-shlibmove.1: update doc to specify which version a specific option
was added.
2002-10-10 Junichi Uekawa <dancer@debian.org>
* d-shlibmove (CHECK_ERROR): more quoting
(DOIT): very much more quoting.
* d-shlibmove.1: document the new option.
* d-shlibmove (INSTALLDIR): add def for PKGDEV and PKGSHL inside the execscript
(INSTALLDIR): quoting fixes
(--movedevdoc): new option.
2002-09-01 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps: add libm6.1-dev override to libc-dev
2002-08-20 Junichi Uekawa <dancer@debian.org>
* d-shlibmove: fix typo.
use $INSTALLDIR instead of install -d
* d-shlibmove.1: document --shlibs-local
* d-shlibmove: add --shlibs-local
2002-08-15 Junichi Uekawa <dancer@debian.org>
* d-shlibmove.1: update documentation, to document --suffix.
* d-shlibmove: clean up code.
(SUFFIX, DEVSUFFIX): define SUFFIX.
--suffix and --devsuffix options.
(CHECK_ERROR): check for conflicts: with package name without
suffix, if suffix is appended.
2002-08-07 Junichi Uekawa <dancer@debian.org>
* d-shlibmove: tolerate nonexisting .la file.
* release 0.2
2002-05-07 Junichi Uekawa <dancer@debian.org>
* debian/copyright: fix copyright text so that it looks more sane.
* debian/README.Debian: update docs
release 0.1
2002-05-04 Junichi Uekawa <dancer@debian.org>
* d-shlibmove : --movedev/shl fix typo.
* d-devlibdeps (outputtmp): fixed typo
* d-shlibmove: add support for devlibdeps.
* d-devlibdeps.1: Document the interface better.
* d-devlibdeps: fixing many parts, and changing it into really
usable content.
add error checking etc.
* debian/control (Depends): added depends on debianutils 1.6
for tempfile
* d-devlibdeps (OUTPUTFILE): error fail on insufficient params
* debian/changelog: add ITP close bug#.
* d-devlibdeps: add copyright notice
* d-shlibmove (CONTROL): remove debugging info.
Copyright notice etc. added.
* debian/docs: added ChangeLog
* debian/README.Debian: some notes.
* Makefile (install): mods.
* debian/control: control is updated
* debian/rules: fixing up some stuff.
2002-05-03 Junichi Uekawa <dancer@debian.org>
* d-devlibdeps.1: created
* d-shlibmove.1: created
* d-shlibmove: some minor shuffling around. It needs some
real good thinking to do much more.
Implemented extra files installation.
use readlink -f instead of readlink
* d-devlibdeps: an imperfect script started to make my life
easier. The list of -dev packages it supports is rather
incomplete. It will be filled up sometime.
2002-05-01 Junichi Uekawa <dancer@debian.org>
* COPYING: added
2002-04-27 Junichi Uekawa <dancer@debian.org>
* d-shlibmove: much updates to make things more versatile
2002-04-26 Junichi Uekawa <dancer@debian.org>
* d-shlibmove: Renamed to d-shlibmove from libmove.sh
Preparation for release.

29
Makefile Normal file
View File

@ -0,0 +1,29 @@
installdir:=install -d -m 755
installbin:=install -m 755
all:
check:
bash -n d-shlibmove
bash -n d-devlibdeps
shellcheck d-shlibmove
shellcheck d-devlibdeps
test-build:
mkdir TESTS
( cd TESTS; \
for PKG in dancer-xml dlisp libdshconfig libgtkdatabox ; do \
( mkdir $$PKG ; cd $$PKG ; apt-get source $$PKG; cd */ ; /usr/bin/debuild -us -uc ; debc; ) ; \
done ) 2>&1 | tee tests.log
install:
$(installdir) $(DESTDIR)/usr/bin/
$(installbin) d-shlibmove $(DESTDIR)/usr/bin/d-shlibmove
$(installbin) d-devlibdeps $(DESTDIR)/usr/bin/d-devlibdeps
clean:
-rm -f *~
-rm -rf TESTS

2
README Normal file
View File

@ -0,0 +1,2 @@
The script "d-shlibmove" tries to move around a shared library file
into the appropriate directory.

335
d-devlibdeps Executable file
View File

@ -0,0 +1,335 @@
#!/bin/bash
# d-devlibdeps -- get list of build-time dependencies
# Copyright (C) 2002-2005 Junichi Uekawa
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 2002 May 3. Created.
# automatic depends line generator.
set -e
set -o pipefail
eval "$(dpkg-architecture -s)"
getname() {
local SONAMELIBNAME
local SONAMEVERSION
local SONAME
SONAME="$1"
SONAMELIBNAME=${SONAME/%.so*}
SONAMEVERSION=${SONAME/#*.so.}
case "$SONAMELIBNAME" in
*[0-9])
RETURN="$SONAMELIBNAME-$SONAMEVERSION"
;;
*)
RETURN="$SONAMELIBNAME$SONAMEVERSION"
;;
esac
}
overridedevlibdeps() {
# overrides necessary until the scheme is adopted.
sed \
"${OVERRIDE[@]/#/-e}" \
-e 's/libclibc\.so-dev//' \
-e 's/ld1-dev//' \
-e 's/ld64-[12]-dev//' \
-e 's/ld-\(k\?freebsd\|linux\).*[0-9]-dev//' \
-e 's/lib\(avcodec\|avdevice\|avfilter\|avformat\|avresample\|avutil\|postproc\|swresample\|swscale\)\(-ffmpeg\)\?[0-9]\+-dev/lib\1-dev/' \
-e 's/lib\(cdt\|cgraph\|gvpr\|pathplan\|xdot\)[0-9][^-]*-dev/libgraphviz-dev/' \
-e 's/libanl1-dev//' \
-e 's/libatk-1\.0-0-dev/libatk1.0-dev/' \
-e 's/libatomic1-dev//' \
-e 's/libavahi-client.\?-dev/libavahi-client-dev/' \
-e 's/libavahi-common.\?-dev/libavahi-common-dev/' \
-e 's/libavahi-glib.\?-dev/libavahi-glib-dev/' \
-e 's/libblas3-dev/libblas-dev/' \
-e 's/libboost_\([a-z0-9.]\+\)\.[0-9]-dev/libboost-\1-dev/' \
-e 's/libboost_\([a-z0-9.]\+\)_\([a-z0-9.]\+\)\.[0-9]-dev/libboost-\1-\2-dev/' \
-e 's/libbpp-\([-a-z]\+\)[0-9]*-dev/libbpp-\1-dev/' \
-e 's/libbz2-1.0-dev/libbz2-dev/' \
-e 's/libc[0-9][.0-9]*-dev//' \
-e 's/libcairo-gobject2-dev/libcairo-dev/' \
-e 's/libcblas3-dev/libcblas-dev/' \
-e 's/libcelt0-0-dev/libcelt-dev/' \
-e 's/libcholmod[.0-9]\+-dev/libsuitesparse-dev/' \
-e 's/libcomerr2//' \
-e 's/libcom_err2-dev/comerr-dev/' \
-e 's/libcrack2-dev/cracklib2-dev/' \
-e 's/libcrypt1\.1-dev//' \
-e 's/libcrypt1-dev//' \
-e 's/libcrypto.*-dev/libssl-dev/' \
-e 's/libcurl4-dev/libcurl4-openssl-dev/' \
-e 's/libcurl-gnutls4-dev/libcurl4-gnutls-dev/' \
-e 's/libctpp2-.*-dev/libctpp2-dev/' \
-e 's/libdbus-1-3-dev/libdbus-1-dev/' \
-e 's/libdcm\(data\|net\)[0-9]\+-dev/libdcmtk-dev/' \
-e 's/libdeflate[.0-9]\+-dev/libdeflate-dev/' \
-e 's/libdl2\.1-dev//' \
-e 's/libdl2-dev//' \
-e 's/libeditorconfig0-dev/libeditorconfig-dev/' \
-e 's/libeXosip2-[0-9]\+-dev/libexosip2-dev/' \
-e 's/libf2clibf2c.so-dev/libf2c2-dev/' \
-e 's/libffado2-dev/libffado-dev/' \
-e 's/libfml[.0-9]\+-dev/libfml-dev/' \
-e 's/libfribidi0-dev/libfribidi-dev/' \
-e 's/libGenome-\([.0-9]\+\)-[0-9]\+-dev/libgenome-\1-dev/' \
-e 's/libGenome[.0-9]\+-dev/libgenome-dev/' \
-e 's/libGL1-dev/xlibmesa-gl-dev/' \
-e 's/libGLU1-dev/xlibmesa-glu-dev/' \
-e 's/libgcc_s.*-dev//' \
-e 's/libgconf-2-4-dev/libgconf2-dev/' \
-e 's/libgd[23]-dev/libgd-dev/' \
-e 's/libgdk-1\.2-0-dev/libgtk1.2-dev/' \
-e 's/libgdk-3-0-dev/libgtk-3-dev/' \
-e 's/libgdk_pixbuf-2\.0-0-dev/libgtk2.0-dev/' \
-e 's/libgdk-x11-2\.0-0-dev/libgtk2.0-dev/' \
-e 's/libgfortran[345]-dev/libgfortran-10-dev/' \
-e 's/libgif7-dev/libgif-dev/' \
-e 's/libgio-2\.0-0-dev/libglib2.0-dev/' \
-e 's/libgioftp2-dev/libfontforge-dev/' \
-e 's/libglib-1\.2-0-dev/libglib1.2-dev/' \
-e 's/libglib-2\.0-0-dev/libglib2.0-dev/' \
-e 's/libglpk[.0-9]\+-dev/libglpk-dev/' \
-e 's/libgmodule-1\.2-0-dev/libglib1.2-dev/' \
-e 's/libgmodule-2\.0-0-dev/libglib2.0-dev/' \
-e 's/libgmp10-dev/libgmp-dev/' \
-e 's/libgnutls26/libgnutls/' \
-e 's/libgnutls\(-deb0-28\|30\)/libgnutls28/' \
-e 's/libgobject-2\.0-0-dev/libglib2.0-dev/' \
-e 's/libgomp1-dev//' \
-e 's/libgsl23-dev/libgsl-dev/' \
-e 's/libgssapi_krb5-2-dev/libkrb5-dev/' \
-e 's/libgthread-1\.2-0-dev/libglib1.2-dev/' \
-e 's/libgthread-2\.0-0-dev/libglib2.0-dev/' \
-e 's/libgtk-1\.2-0-dev/libgtk1.2-dev/' \
-e 's/libgtk-3-0-dev/libgtk-3-dev/' \
-e 's/libgtk-x11-2\.0-0-dev/libgtk2.0-dev/' \
-e 's/libgunicode[0-9]-dev/libfontforge-dev/' \
-e 's/libgutils[0-9]-dev/libfontforge-dev/' \
-e 's/libharfbuzz[0-9.]\+-dev/libharfbuzz-dev/' \
-e 's/libhts[1-9]-dev/libhts-dev/' \
-e 's/libhtscodecs[.0-9]\+-dev/libhtscodecs-dev/' \
-e 's/libhdf5_serial.*-dev/libhdf5-dev/' \
-e 's/libhunspell-[0-9.-]\+-dev/libhunspell-dev/' \
-e 's/libICE6-dev/libice-dev/' \
-e 's/libicu\(i18n\|uc\)[0-9]\+-dev/libicu-dev/' \
-e 's/libijs.*-dev/libijs-dev/' \
-e 's/libjackserver0-dev//' \
-e 's/libjasper1/libjasper/' \
-e 's/libjpeg[0-9.]\+-dev/libjpeg-dev/' \
-e 's/libjsoncpp[.0-9]\+-dev/libjsoncpp-dev/' \
-e 's/libk5crypto3-dev/libkrb5-dev/' \
-e 's/libkrb1-dev/kerberos4kth-dev/' \
-e 's/libkrb5-3-dev/libkrb5-dev/' \
-e 's/liblapack3-dev/liblapack-dev/' \
-e 's/liblcms2-2-dev/liblcms2-dev/' \
-e 's/libleveldb1-dev/libleveldb-dev/' \
-e 's/libmaus2_.*-dev/libmaus2-dev/' \
-e 's/lib\(nspr\|plc\|plds\)4-lib\(nspr\|plc\|plds\)4.so-dev/libnspr4-dev/' \
-e 's/lib\(nss\|nssutil\|smime\)3-lib\(nss\|nssutil\|smime\)3.so-dev/libnss3-dev/' \
-e 's/libre[.0-9]\+-dev/libre-dev/' \
-e 's/librem[.0-9]\+-dev/librem-dev/' \
-e 's/liblzma5-dev/liblzma-dev/' \
-e 's/libls1-dev//' \
-e 's/libMUSCLE-\([.0-9]\+\)-[0-9]\+-dev/libmuscle-\1-dev/' \
-e 's/libMUSCLE[.0-9]\+-dev/libmuscle-dev/' \
-e 's/libm1-dev//' \
-e 's/libm6\.1-dev//' \
-e 's/libm6-dev//' \
-e 's/libmbed[.a-z0-9-]\+-dev/libmbedtls-dev/' \
-e 's/libminisat2-dev/minisat/' \
-e 's/libncurses6-dev/libncurses-dev/' \
-e 's/libnettle[.0-9]*-dev/nettle-dev/' \
-e 's/libnsl1\.1-dev//' \
-e 's/libnsl1-dev//' \
-e 's/libof\(log\|std\)[0-9]\+-dev/libdcmtk-dev/' \
-e 's/libogg0-dev/libogg-dev/' \
-e 's/libopencore-\(amr[nw]b\)[0-9]\+-dev/libopencore-\1-dev/' \
-e 's/libopus0-dev/libopus-dev/' \
-e 's/libosip\(parser\)\?2-[0-9]\+-dev/libosip2-dev/' \
-e 's/libpam0-dev/libpam0g-dev/' \
-e 's/libpango\(\|cairo\|ft2\|x\|xft\)-1\.0-0-dev/libpango1.0-dev/' \
-e 's/libpaper1/libpaper/' \
-e 's/libparted-1\.6-0-dev/libparted1.6-dev/' \
-e 's/libpbbam[.0-9]\+-dev/libpbbam-dev/' \
-e 's/libpbcopper[.0-9]\+-dev/libpbcopper-dev/' \
-e 's/libpcre2-[0-9-]\+-dev/libpcre2-dev/' \
-e 's/libpj\(\|lib-util\|media\(\|-audiodev\|-codec\|-videodev\)\|nath\|sip\(\|-simple\|-ua\)\|sua\)2-dev/libpjproject-dev/' \
-e 's/libpng16-16-dev/libpng-dev/' \
-e 's/libpopt0-dev/libpopt-dev/' \
-e 's/libportaudio2-dev/portaudio19-dev/' \
-e 's/libProgressBar0-dev/libgkarrays-dev/' \
-e 's/libprotobuf[0-9]\+-dev/libprotobuf-dev/' \
-e 's/libpugixml.*-dev/libpugixml-dev/' \
-e 's/libpthread0\.3-dev//' \
-e 's/libpthread0-dev//' \
-e 's/libpthread-stubs0-dev//' \
-e 's/libpvm3-3-dev/pvm-dev/' \
-e 's/libpython2.7-1\.0-dev/libpython-dev/' \
-e 's/libpython3\.\([.0-9]\+\)m\?[-.0-9]\+-dev/libpython3.\1-dev/' \
-e 's/libQtCore4-dev/libqt4-dev/' \
-e 's/libQtGui4-dev/libqt4-dev/' \
-e 's/libQt5\(\|Core\|Gui\|Widgets\)5-dev/qtdeclarative5-dev/' \
-e 's/libquadmath0-dev//' \
-e 's/libraptor2-0-dev/libraptor2-dev/' \
-e 's/libraw1394-8-dev/libraw1394-dev/' \
-e 's/libreadline[7-8]-dev/libreadline-dev/' \
-e 's/libresolv[.0-9]\+-dev//' \
-e 's/librsvg-2-2-dev/librsvg2-dev/' \
-e 's/librt1-dev//' \
-e 's/libSDL-1\.2-0-dev/libsdl1.2-dev/' \
-e 's/libSDL2-[0-9.-]\+-dev/libsdl2-dev/' \
-e 's/libSM6-dev/libsm-dev/' \
-e 's/libsecp256k1-0-dev/libsecp256k1-dev/' \
-e 's/libsipwitch.*-dev/libsipwitch-dev/' \
-e 's/libspeex1-dev/libspeex-dev/' \
-e 's/libspeexdsp1-dev/libspeexdsp-dev/' \
-e 's/libspiro[0-9]\+-dev/libspiro-dev/' \
-e 's/libsqlite3-[.0-9]\+-dev/libsqlite3-dev/' \
-e 's/libssl.*-dev/libssl-dev/' \
-e 's/libssw[.0-9]\+-dev/libssw-dev/' \
-e 's/libsrtp0/libsrtp/' \
-e 's/libstdc++6.*-dev//' \
-e 's/libsvm3-dev/libsvm-dev/' \
-e 's/libtheora0-dev/libtheora-dev/' \
-e 's/libtinfo6-dev/libtinfo-dev/' \
-e 's/libtinyxml[.0-9]\+-dev/libtinyxml-dev/' \
-e 's/libtrio[12]-dev/libtrio-dev/' \
-e 's/libu\(common\|secure\)[0-9]*-dev/libucommon-dev/' \
-e 's/libuninameslist1-dev/libuninameslist-dev/' \
-e 's/libutil1-dev//' \
-e 's/libuuid1-dev/uuid-dev/' \
-e 's/libv4l2-0-dev/libv4l-dev/' \
-e 's/libv8-[0-9.]*-dev/libv8-dev/' \
-e 's/libvo-amrwbenc0-dev/libvo-amrwbenc-dev/' \
-e 's/libvorbis0-dev/libvorbis-dev/' \
-e 's/libvorbisenc2-dev/libvorbis-dev/' \
-e 's/libwoff2.*-dev/libwoff-dev/' \
-e 's/libX11-6-dev/libx11-dev/' \
-e 's/libX\([a-z]\+\)[0-9]-dev/libx\1-dev/' \
-e 's/libxml2-2-dev/libxml2-dev/' \
-e 's/libz1-dev/zlib1g-dev/' \
-e 's/libznz[0-9.]*-dev/libznz-dev/' \
-e 's/libzstd[.0-9.]*-dev/libzstd-dev/' \
-e 's/xlibmesa-gl-dev/libgl1-mesa-dev/' \
"${OVERRIDE[@]/#/-e}"
}
validate_package() {
# validate if package foo exists, this relies on apt.
if [ -z "$1" ]; then
# ignore empty.
return;
fi
if grep "^Package: $1\$" debian/control > /dev/null 2> /dev/null; then
# ignore package that is going to be created.
echo " --> $1 package from same source package." >&2
return
fi
case $(apt-cache show "$1" 2> /dev/null | wc -l) in
0)
case $(apt-cache showpkg "$1" 2> /dev/null \
| awk ' /^Reverse Provides: $/,/^$/ {if ($0 !~ /:/) {print $0}}' \
| wc -l) in
0)
echo "devlibs error: There is no package matching [$1] and noone provides it, please report bug to d-shlibs maintainer" >&2
return 1
;;
*)
echo " --> $1 is provided by a package." >&2
;;
esac
;;
*)
echo " --> $1 package exists." >&2
;;
esac
return 0;
}
while true; do
case "$1" in
--override=*)
OVERRIDE[${#OVERRIDE[@]}]="${1/--override=/}"
shift
;;
--override)
OVERRIDE[${#OVERRIDE[@]}]="$2"
shift 2
;;
--)
shift
break
;;
--*)
echo "$0: Unknown option $1" > /dev/stderr
exit 64 # EX_USAGE: command line usage error
;;
*)
break
;;
esac
done
if [ -z "$2" ]; then
echo "$0: Please read manpage for help, not enough options given"
exit 1
fi
OUTPUTFILE="$1"
shift;
DEPENDS=""
for A in "$@"; do
# let shell do the delimiting of objdump output./
DEPENDS="${DEPENDS:+$DEPENDS }$(set -o pipefail; "$DEB_HOST_GNU_TYPE-objdump" -p "$A" \
| sed -n 's/^.*NEEDED *//p')"
done
outputtmp=$(mktemp)
(
set -e
if [ -f "$OUTPUTFILE" ]; then
if grep -v "^devlibs:Depends=" "$OUTPUTFILE"; then
:
fi
fi
printf "devlibs:Depends="
for A in $DEPENDS; do #DEPENDS is a space-delimited thing.
getname "$A"
echo "$RETURN-dev" | overridedevlibdeps
done \
| LC_ALL=C sort \
| uniq \
| while read -r B B_alt; do
if validate_package "$B"; then
printf "%s " "$B $B_alt";
else
echo "ERROR_DEVLIB "
fi
done \
| sed -e 's/\([a-z0-9)]\) \+\([a-z]\)/\1, \2/g' -e 's/ \+/ /g' -e 's/^ //' -e 's/ $//'
printf '\n'
) > "$outputtmp"
if grep "ERROR_DEVLIB" "$outputtmp" > /dev/null; then
exit 1
fi
mv "$outputtmp" "$OUTPUTFILE"

39
d-devlibdeps.1 Normal file
View File

@ -0,0 +1,39 @@
.TH "d-devlibdeps" 1 "2002 May 3" "Debian GNU/Linux" "d-shlibs manual"
.SH NAME
d-devlibdeps \- Check and list dependencies of development library packages
.SH "SYNOPSIS"
.BI "d-devlibdeps [" "options" "] [" "substvars file" "] [" "shared-library" "] ..."
.SH "DESCRIPTION"
This program gives out
a list of development dependencies for a shared library,
to be used in
.B Depends:
field of a Debian package.
.B devlibs:Depends
entry in substvars file is updated.
.SH "OPTIONS"
.TP
.BI "--override=[" "override statement" "]"
.TP
.BI "--override [" "override statement" "]"
Add an overriding sed expression, which looks like
.IR "--override s/libshared1-dev/libshared-dev/" .
This expression is executed after the other rules.
Multiple
.B "--override"
can be specified.
Added in version 0.30
.SH "EXAMPLES"
None.
.SH "AUTHOR"
Junichi Uekawa <dancer@debian.org> <dancer@netfort.gr.jp>
.SH "SEE ALSO"
.RI "d-shlibmove (" 1 ")"

289
d-shlibmove Executable file
View File

@ -0,0 +1,289 @@
#!/bin/bash
# d-shlibmove -- move shared library files around for Debian packaging
# Copyright (C) 2002, 2005 Junichi Uekawa
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 2002 Apr 23. Created.
# automatic packaging of libtool-created library packages.
# from d-shlibs package
set -e
set -o pipefail
eval "$(dpkg-architecture -s)"
getname() {
local SONAMELIBNAME
local SONAMEVERSION
local SONAME
SONAME="$1"
SONAMELIBNAME=${SONAME/%.so*}
SONAMEVERSION=${SONAME/#*.so.}
case "$SONAMELIBNAME" in
*[0-9])
RETURN="$SONAMELIBNAME-$SONAMEVERSION"
;;
*)
RETURN="$SONAMELIBNAME$SONAMEVERSION"
;;
esac
}
readlibnameinfo() {
LIBNAME="$1"
if [ -z "$1" ] || ! echo "$1" | grep ".so$" > /dev/null; then
echo "$0: [$1] is not a valid shared library file name" >&2
exit 1;
fi
if [ ! -h "$1" ]; then
echo "$0: expected [$1] to be a symlink, but it is not" >&2
exit 1;
fi
SONAME=$(set -o pipefail; "$DEB_HOST_GNU_TYPE-objdump" -p "$LIBNAME" \
| sed -n 's/^.*SONAME *//p')
getname "$SONAME"
SONAMEPKGNAME=$(echo "$RETURN" | tr '[:upper:]_' '[:lower:]-')
PK=$(basename "$1" | sed 's/\.so$//')
PK_LOWER=$(echo "$PK" | tr '[:upper:]_' '[:lower:]-')
REALSO=$(readlink -f "$LIBNAME")
}
check_line() {
local PKGNAME="$1"
local ENTRYLINE="$2"
if ! awk '/^Package:.*'"$PKGNAME"'/,/^$/{print}' "$CONTROL" \
| perl -0 -pe 's/\n[ \t]+/ /g' \
| grep "$ENTRYLINE" > /dev/null; then
echo "E: line [$ENTRYLINE] not found in $CONTROL section for $PKGNAME"
# set this error signifier to true
CHECK_ERROR=true
fi
}
echo "Library package automatic movement utility"
CONTROL=debian/control
execscript=$(mktemp)
INSTALLFILE_SHLPKG=$(mktemp)
INSTALLFILE_DEVPKG=$(mktemp)
cat > "$execscript" <<EOF
set -e
EOF
EXTRALIBS=()
SUFFIX=
DEVSUFFIX=
TRANSITIONSUFFIX=
DOIT=no
DEVUNVERSIONED=no
IGNORELIBDEP=no
INCLUDEA=yes
INCLUDELA=yes
MULTIARCH=no
while [ -n "$1" ]; do
case "$1" in
--moveshl)
echo "$2 $3" >> "$INSTALLFILE_SHLPKG"
shift; shift; shift;
;;
--movedev)
echo "$2 $3" >> "$INSTALLFILE_DEVPKG"
shift; shift; shift;
;;
--movedevdoc)
echo "$2 usr/share/doc/\${PKGDEV}" >> "$INSTALLFILE_DEVPKG"
shift; shift;
;;
--commit)
DOIT=yes
shift;
;;
--multiarch)
MULTIARCH=yes
shift;
;;
--extralib)
EXTRALIBS+=("$2")
shift; shift;
;;
--shlibs-local)
shift;
SHLIBSLOCALVER="$1";
shift;
;;
--suffix)
shift;
SUFFIX="$1";
shift;
;;
--devsuffix)
shift;
DEVSUFFIX="$1";
shift;
;;
--devunversioned)
DEVUNVERSIONED=yes
shift;;
--ignorelibdep)
IGNORELIBDEP=yes
shift;;
--c102)
TRANSITIONSUFFIX="c102"
shift;;
--ldbl)
TRANSITIONSUFFIX="ldbl"
shift;;
--v5)
TRANSITIONSUFFIX="v5"
shift;;
--include-a)
INCLUDEA=yes
shift;;
--exclude-a)
INCLUDEA=no
shift;;
--include-la)
INCLUDELA=yes
shift;;
--exclude-la)
INCLUDELA=no
shift;;
--override)
OVERRIDE[${#OVERRIDE[@]}]="$2"
shift; shift;;
--|*)
break;
;;
esac
done
# path/libxxxx.so.yyy.zz.zz
# ------------------------- REALSO (actual .so filename that is linked to)
# -------------- SONAME
# ------- --- SONAMEPKGNAME (lowercased for package name)
# --------------- $1
# ---------- PK
# ---------- PK_LOWER (lowercased for package name)
DEVLIB_TO_CHECK=()
for extralib in "${EXTRALIBS[@]}"; do
readlibnameinfo "$extralib"
DEVLIB_TO_CHECK+=("$extralib")
if [ "$INCLUDEA" = "yes" ]; then
echo "$(dirname "$extralib")/$PK.a usr/lib" >> "$INSTALLFILE_DEVPKG"
fi
if [ "$INCLUDELA" = "yes" ]; then
echo "$(dirname "$extralib")/$PK.la usr/lib || true" >> "$INSTALLFILE_DEVPKG"
fi
echo "$(dirname "$extralib")/$PK.so usr/lib" >> "$INSTALLFILE_DEVPKG"
echo "$(dirname "$REALSO")/$SONAME usr/lib" >> "$INSTALLFILE_SHLPKG"
echo "$REALSO usr/lib" >> "$INSTALLFILE_SHLPKG"
done
DEVLIB_TO_CHECK+=("$1")
readlibnameinfo "$1"
if [ "$DEVUNVERSIONED" = "yes" ]; then
PKGDEV="$PK_LOWER$DEVSUFFIX-dev"
else
PKGDEV="$SONAMEPKGNAME$DEVSUFFIX-dev"
fi
PKGSHL="$SONAMEPKGNAME$SUFFIX$TRANSITIONSUFFIX"
INSTALLDIR="install -d -m 755"
echo "$INSTALLDIR debian/$PKGDEV/usr/lib" >> "$execscript"
echo "$INSTALLDIR debian/$PKGSHL/usr/lib" >> "$execscript"
if [ "$INCLUDEA" = "yes" ]; then
echo "mv $(dirname "$1")/$PK.a debian/$PKGDEV/usr/lib" >> "$execscript"
fi
if [ "$INCLUDELA" = "yes" ]; then
echo "mv $(dirname "$1")/$PK.la debian/$PKGDEV/usr/lib || true" >> "$execscript"
fi
echo "mv $(dirname "$1")/$PK.so debian/$PKGDEV/usr/lib" >> "$execscript"
echo "mv $(dirname "$REALSO")/$SONAME debian/$PKGSHL/usr/lib" >> "$execscript"
if [ "$(dirname "$REALSO")/$SONAME" != "$REALSO" ]; then
echo "mv $REALSO debian/$PKGSHL/usr/lib" >> "$execscript"
fi
if [ -n "$SHLIBSLOCALVER" ]; then
echo "echo \"$SONAMELIBNAME $SONAMEVERSION $PKGSHL (>= $SHLIBSLOCALVER)\" >> debian/shlibs.local" >> "$execscript"
fi
d-devlibdeps "${OVERRIDE[@]/#/--override=}" "debian/$PKGDEV.substvars" "${DEVLIB_TO_CHECK[@]}"
#do some definition for the file.
echo "PKGDEV=$PKGDEV" >> "$execscript"
echo "PKGSHL=$PKGSHL" >> "$execscript"
#do the extra files
while read -r A B; do
echo "$INSTALLDIR debian/$PKGSHL/$B" >> "$execscript"
echo "mv $A debian/$PKGSHL/$B" >> "$execscript"
done < "$INSTALLFILE_SHLPKG"
if [ "$INCLUDELA" = "no" ]; then
sed -i -e '/^.*\.la usr\/lib || true$/d' "$INSTALLFILE_DEVPKG"
fi
while read -r A B; do
echo "$INSTALLDIR debian/$PKGDEV/$B" >> "$execscript"
echo "mv $A debian/$PKGDEV/$B" >> "$execscript"
done < "$INSTALLFILE_DEVPKG"
if [ "$MULTIARCH" = "yes" ]; then
sed -i -e "s/usr\\/lib\\( || true\\)\\?$/usr\\/lib\\/$DEB_HOST_MULTIARCH\\1/" "$execscript"
fi
cat "$execscript"
# check the syntax of the control file.
CHECK_ERROR=false
if ! [ "$DEVUNVERSIONED" = "yes" ]; then
check_line "$PKGDEV" "Provides:.*$PK_LOWER-dev"
check_line "$PKGDEV" "Conflicts:.*$PK_LOWER-dev"
fi
check_line "$PKGSHL" 'Section: \(libs\|non-free/libs\)'
if [ -n "$SUFFIX" ]; then
check_line "$PKGSHL" "Conflicts: $SONAMEPKGNAME"
fi
if [ -n "$TRANSITIONSUFFIX" ]; then
check_line "$PKGSHL" "Conflicts: $SONAMEPKGNAME$SUFFIX"
fi
check_line "$PKGDEV" 'Section: \(devel\|libdevel\|non-free/libdevel\)'
if ! [ "$IGNORELIBDEP" = "yes" ]; then
check_line "$PKGDEV" "Depends:.*$PKGSHL"
fi
check_line "$PKGSHL" "Depends:.*[$]{shlibs:Depends}"
if [ "$CHECK_ERROR" = "true" ]; then
echo "Error occurred, aborting" >&2
exit 1
fi
if [ "$DOIT" = "yes" ]; then
sh "$execscript"
else
echo "Dry-run. If you are satisfied, run with --commit"
exit 2
fi
rm -f "$execscript" "$INSTALLFILE_DEVPKG" "$INSTALLFILE_SHLPKG"
exit 0

187
d-shlibmove.1 Normal file
View File

@ -0,0 +1,187 @@
.TH "d-shlibmove" 1 "2002 May 3" "Debian GNU/Linux" "d-shlibs manual"
.SH NAME
d-shlibmove \- Move shared library files around in Debian package creation process
.SH "SYNOPSIS"
.BI "d-shlibmove [" "options" "] " "shared-library.so"
.SH "DESCRIPTION"
Call this program in
.B "debian/rules"
as a replacement of
.B "dh_movefiles"
for shared library packages.
It also checks debian/control for validity.
.SH "OPTIONS"
.TP
.BI "--movedev [" "filename" "] [" "relative dir-path" "]"
Install file into relative directory path within the
.B -dev
package.
The dir will be created with
.B "install -d"
and the file will be moved.
.TP
.BI "--moveshl [" "filename" "] [" "relative dir-path" "]"
Install file into relative directory path within the
shared library runtime package.
The dir will be created with
.B "install -d"
and the file will be moved.
.TP
.BI "--movedevdoc [" "filename" "] "
Install file into the documentation directory of
.B -dev
package.
The dir will be created with
.B "install -d"
and the file will be moved.
Added in version 0.4
.TP
.BI "--extralib [" "shared-library.so" "]"
Install the shared library in the same package as the main
shared library.
.TP
.BI "--multiarch"
By default
.B d-shlibmove
installs the shared library and any extralibs into /usr/lib.
Add this flag to install them into /usr/lib/<architecture-tripplet> instead.
Added in version 0.48
.TP
.BI "--commit"
By default
.B d-shlibmove
runs in a dry-run mode. Add this flag to make the moving actually happen.
.TP
.BI "--suffix [" "suffix to add to shared library package" "]"
Add a suffix to shared library package.
This is a workaround when binary interface to package changed,
and some fixup to Debian packaging needs to be done.
Added in version 0.3
.TP
.BI "--devsuffix [" "suffix to add to development package" "]"
Add a suffix to development package.
For making incompatible development package.
.TP
.BI "--shlibs-local [" "current-version" "]"
Create a debian/shlibs.local file to use, and specify current-version of
shared library package.
You need to remove debian/shlibs.local, because this only appends to, not
overwrite.
Added in version 0.3
.TP
.B "--devunversioned"
Install into unversioned development package.
Added in version 0.42
.TP
.B "--ignorelibdep"
Suppress shlib dependency. Useful when dynamically resolved e.g. using
CDBS.
Added in version 0.42
.TP
.B "--c102"
Add c102 suffix to package names, for C++ ABI transition.
Added in version 0.8
.TP
.B "--ldbl"
Add dbl suffix to package names.
Added in version 0.35
.TP
.B "--v5"
Add v5 suffix to package names.
Added in version 0.61
.TP
.B "--include-a"
Install the *.a files.
This is the default behavior.
Added in version 0.51
.TP
.B "--exclude-a"
Avoid installing *.a files.
Added in version 0.51
.TP
.B "--include-la"
Install the *.la files.
This is the default behavior.
Added in version 0.45
.TP
.B "--exclude-la"
Avoid installing *.la files.
Added in version 0.45
.TP
.BI "--override [" "override statement" "]"
Add an overriding sed expression, which looks like
.IR "--override s/libshared1-dev/libshared-dev/" .
This expression is executed after the other rules.
Multiple
.B "--override"
can be specified.
Added in version 0.30
.SH "EXIT CODE"
Return 1 on error.
Return 2 on dry-run.
Return 0 on success.
.SH "EXAMPLES"
The following is a sample command-line of a hypothetical package
installation.
.B "d-shlibmove --commit --movedev ""debian/tmp/usr/include/*"" usr/include --extralib debian/tmp/usr/lib/libhomeman-pthread.so debian/tmp/usr/lib/libhomeman.so"
.SH "AUTHOR"
Junichi Uekawa <dancer@debian.org> <dancer@netfort.gr.jp>
.SH "SEE ALSO"
.RI "d-devlibdeps (" 1 ")"

12
example.control Normal file
View File

@ -0,0 +1,12 @@
Package: libgmodule-1.2-0
Section: libs
Depends: ${shlibs:Depends}
Package: libgmodule-1.2-0-dev
Section: devel
Depends: libgmodule-1.2-0
Provides: libgmodule-dev
Conflicts: libgmodule-dev
Package: libstdc++