This file is indexed.

/usr/share/doc/debian-policy/policy.html/ch-sharedlibs.html is in debian-policy 3.9.3.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">

<title>Debian Policy Manual - Shared libraries</title>

<link href="index.html" rel="start">
<link href="ch-relationships.html" rel="prev">
<link href="ch-opersys.html" rel="next">
<link href="index.html#contents" rel="contents">
<link href="index.html#copyright" rel="copyright">
<link href="ch-scope.html" rel="chapter" title="1 About this manual">
<link href="ch-archive.html" rel="chapter" title="2 The Debian Archive">
<link href="ch-binary.html" rel="chapter" title="3 Binary packages">
<link href="ch-source.html" rel="chapter" title="4 Source packages">
<link href="ch-controlfields.html" rel="chapter" title="5 Control files and their fields">
<link href="ch-maintainerscripts.html" rel="chapter" title="6 Package maintainer scripts and installation procedure">
<link href="ch-relationships.html" rel="chapter" title="7 Declaring relationships between packages">
<link href="ch-sharedlibs.html" rel="chapter" title="8 Shared libraries">
<link href="ch-opersys.html" rel="chapter" title="9 The Operating System">
<link href="ch-files.html" rel="chapter" title="10 Files">
<link href="ch-customized-programs.html" rel="chapter" title="11 Customized programs">
<link href="ch-docs.html" rel="chapter" title="12 Documentation">
<link href="ap-pkg-scope.html" rel="appendix" title="A Introduction and scope of these appendices">
<link href="ap-pkg-binarypkg.html" rel="appendix" title="B Binary packages (from old Packaging Manual)">
<link href="ap-pkg-sourcepkg.html" rel="appendix" title="C Source packages (from old Packaging Manual)">
<link href="ap-pkg-controlfields.html" rel="appendix" title="D Control files and their fields (from old Packaging Manual)">
<link href="ap-pkg-conffiles.html" rel="appendix" title="E Configuration file handling (from old Packaging Manual)">
<link href="ap-pkg-alternatives.html" rel="appendix" title="F Alternative versions of an interface - update-alternatives (from old Packaging Manual)">
<link href="ap-pkg-diversions.html" rel="appendix" title="G Diversions - overriding a package's version of a file (from old Packaging Manual)">
<link href="ch-scope.html#s1.1" rel="section" title="1.1 Scope">
<link href="ch-scope.html#s1.2" rel="section" title="1.2 New versions of this document">
<link href="ch-scope.html#s-authors" rel="section" title="1.3 Authors and Maintainers">
<link href="ch-scope.html#s-related" rel="section" title="1.4 Related documents">
<link href="ch-scope.html#s-definitions" rel="section" title="1.5 Definitions">
<link href="ch-archive.html#s-dfsg" rel="section" title="2.1 The Debian Free Software Guidelines">
<link href="ch-archive.html#s-sections" rel="section" title="2.2 Archive areas">
<link href="ch-archive.html#s-pkgcopyright" rel="section" title="2.3 Copyright considerations">
<link href="ch-archive.html#s-subsections" rel="section" title="2.4 Sections">
<link href="ch-archive.html#s-priorities" rel="section" title="2.5 Priorities">
<link href="ch-binary.html#s3.1" rel="section" title="3.1 The package name">
<link href="ch-binary.html#s-versions" rel="section" title="3.2 The version of a package">
<link href="ch-binary.html#s-maintainer" rel="section" title="3.3 The maintainer of a package">
<link href="ch-binary.html#s-descriptions" rel="section" title="3.4 The description of a package">
<link href="ch-binary.html#s-dependencies" rel="section" title="3.5 Dependencies">
<link href="ch-binary.html#s-virtual_pkg" rel="section" title="3.6 Virtual packages">
<link href="ch-binary.html#s3.7" rel="section" title="3.7 Base system">
<link href="ch-binary.html#s3.8" rel="section" title="3.8 Essential packages">
<link href="ch-binary.html#s-maintscripts" rel="section" title="3.9 Maintainer Scripts">
<link href="ch-source.html#s-standardsversion" rel="section" title="4.1 Standards conformance">
<link href="ch-source.html#s-pkg-relations" rel="section" title="4.2 Package relationships">
<link href="ch-source.html#s4.3" rel="section" title="4.3 Changes to the upstream sources">
<link href="ch-source.html#s-dpkgchangelog" rel="section" title="4.4 Debian changelog: debian/changelog">
<link href="ch-source.html#s-dpkgcopyright" rel="section" title="4.5 Copyright: debian/copyright">
<link href="ch-source.html#s4.6" rel="section" title="4.6 Error trapping in makefiles">
<link href="ch-source.html#s-timestamps" rel="section" title="4.7 Time Stamps">
<link href="ch-source.html#s-restrictions" rel="section" title="4.8 Restrictions on objects in source packages">
<link href="ch-source.html#s-debianrules" rel="section" title="4.9 Main building script: debian/rules">
<link href="ch-source.html#s-substvars" rel="section" title="4.10 Variable substitutions: debian/substvars">
<link href="ch-source.html#s-debianwatch" rel="section" title="4.11 Optional upstream source location: debian/watch">
<link href="ch-source.html#s-debianfiles" rel="section" title="4.12 Generated files list: debian/files">
<link href="ch-source.html#s-embeddedfiles" rel="section" title="4.13 Convenience copies of code">
<link href="ch-source.html#s-readmesource" rel="section" title="4.14 Source package handling: debian/README.source">
<link href="ch-controlfields.html#s-controlsyntax" rel="section" title="5.1 Syntax of control files">
<link href="ch-controlfields.html#s-sourcecontrolfiles" rel="section" title="5.2 Source package control files -- debian/control">
<link href="ch-controlfields.html#s-binarycontrolfiles" rel="section" title="5.3 Binary package control files -- DEBIAN/control">
<link href="ch-controlfields.html#s-debiansourcecontrolfiles" rel="section" title="5.4 Debian source control files -- .dsc">
<link href="ch-controlfields.html#s-debianchangesfiles" rel="section" title="5.5 Debian changes files -- .changes">
<link href="ch-controlfields.html#s-controlfieldslist" rel="section" title="5.6 List of fields">
<link href="ch-controlfields.html#s5.7" rel="section" title="5.7 User-defined fields">
<link href="ch-maintainerscripts.html#s6.1" rel="section" title="6.1 Introduction to package maintainer scripts">
<link href="ch-maintainerscripts.html#s-idempotency" rel="section" title="6.2 Maintainer scripts idempotency">
<link href="ch-maintainerscripts.html#s-controllingterminal" rel="section" title="6.3 Controlling terminal for maintainer scripts">
<link href="ch-maintainerscripts.html#s-exitstatus" rel="section" title="6.4 Exit status">
<link href="ch-maintainerscripts.html#s-mscriptsinstact" rel="section" title="6.5 Summary of ways maintainer scripts are called">
<link href="ch-maintainerscripts.html#s-unpackphase" rel="section" title="6.6 Details of unpack phase of installation or upgrade">
<link href="ch-maintainerscripts.html#s-configdetails" rel="section" title="6.7 Details of configuration">
<link href="ch-maintainerscripts.html#s-removedetails" rel="section" title="6.8 Details of removal and/or configuration purging">
<link href="ch-relationships.html#s-depsyntax" rel="section" title="7.1 Syntax of relationship fields">
<link href="ch-relationships.html#s-binarydeps" rel="section" title="7.2 Binary Dependencies - Depends, Recommends, Suggests, Enhances, Pre-Depends">
<link href="ch-relationships.html#s-breaks" rel="section" title="7.3 Packages which break other packages - Breaks">
<link href="ch-relationships.html#s-conflicts" rel="section" title="7.4 Conflicting binary packages - Conflicts">
<link href="ch-relationships.html#s-virtual" rel="section" title="7.5 Virtual packages - Provides">
<link href="ch-relationships.html#s-replaces" rel="section" title="7.6 Overwriting files and replacing packages - Replaces">
<link href="ch-relationships.html#s-sourcebinarydeps" rel="section" title="7.7 Relationships between source and binary packages - Build-Depends, Build-Depends-Indep, Build-Conflicts, Build-Conflicts-Indep">
<link href="ch-sharedlibs.html#s-sharedlibs-runtime" rel="section" title="8.1 Run-time shared libraries">
<link href="ch-sharedlibs.html#s-sharedlibs-support-files" rel="section" title="8.2 Shared library support files">
<link href="ch-sharedlibs.html#s-sharedlibs-static" rel="section" title="8.3 Static libraries">
<link href="ch-sharedlibs.html#s-sharedlibs-dev" rel="section" title="8.4 Development files">
<link href="ch-sharedlibs.html#s-sharedlibs-intradeps" rel="section" title="8.5 Dependencies between the packages of the same library">
<link href="ch-sharedlibs.html#s-sharedlibs-shlibdeps" rel="section" title="8.6 Dependencies between the library and other packages - the shlibs system">
<link href="ch-opersys.html#s9.1" rel="section" title="9.1 File system hierarchy">
<link href="ch-opersys.html#s9.2" rel="section" title="9.2 Users and groups">
<link href="ch-opersys.html#s-sysvinit" rel="section" title="9.3 System run levels and init.d scripts">
<link href="ch-opersys.html#s9.4" rel="section" title="9.4 Console messages from init.d scripts">
<link href="ch-opersys.html#s-cron-jobs" rel="section" title="9.5 Cron jobs">
<link href="ch-opersys.html#s-menus" rel="section" title="9.6 Menus">
<link href="ch-opersys.html#s-mime" rel="section" title="9.7 Multimedia handlers">
<link href="ch-opersys.html#s9.8" rel="section" title="9.8 Keyboard configuration">
<link href="ch-opersys.html#s9.9" rel="section" title="9.9 Environment variables">
<link href="ch-opersys.html#s-doc-base" rel="section" title="9.10 Registering Documents using doc-base">
<link href="ch-files.html#s-binaries" rel="section" title="10.1 Binaries">
<link href="ch-files.html#s-libraries" rel="section" title="10.2 Libraries">
<link href="ch-files.html#s10.3" rel="section" title="10.3 Shared libraries">
<link href="ch-files.html#s-scripts" rel="section" title="10.4 Scripts">
<link href="ch-files.html#s10.5" rel="section" title="10.5 Symbolic links">
<link href="ch-files.html#s10.6" rel="section" title="10.6 Device files">
<link href="ch-files.html#s-config-files" rel="section" title="10.7 Configuration files">
<link href="ch-files.html#s10.8" rel="section" title="10.8 Log files">
<link href="ch-files.html#s-permissions-owners" rel="section" title="10.9 Permissions and owners">
<link href="ch-customized-programs.html#s-arch-spec" rel="section" title="11.1 Architecture specification strings">
<link href="ch-customized-programs.html#s11.2" rel="section" title="11.2 Daemons">
<link href="ch-customized-programs.html#s11.3" rel="section" title="11.3 Using pseudo-ttys and modifying wtmp, utmp and lastlog">
<link href="ch-customized-programs.html#s11.4" rel="section" title="11.4 Editors and pagers">
<link href="ch-customized-programs.html#s-web-appl" rel="section" title="11.5 Web servers and applications">
<link href="ch-customized-programs.html#s-mail-transport-agents" rel="section" title="11.6 Mail transport, delivery and user agents">
<link href="ch-customized-programs.html#s11.7" rel="section" title="11.7 News system configuration">
<link href="ch-customized-programs.html#s11.8" rel="section" title="11.8 Programs for the X Window System">
<link href="ch-customized-programs.html#s-perl" rel="section" title="11.9 Perl programs and modules">
<link href="ch-customized-programs.html#s-emacs" rel="section" title="11.10 Emacs lisp programs">
<link href="ch-customized-programs.html#s11.11" rel="section" title="11.11 Games">
<link href="ch-docs.html#s12.1" rel="section" title="12.1 Manual pages">
<link href="ch-docs.html#s12.2" rel="section" title="12.2 Info documents">
<link href="ch-docs.html#s12.3" rel="section" title="12.3 Additional documentation">
<link href="ch-docs.html#s12.4" rel="section" title="12.4 Preferred documentation formats">
<link href="ch-docs.html#s-copyrightfile" rel="section" title="12.5 Copyright information">
<link href="ch-docs.html#s12.6" rel="section" title="12.6 Examples">
<link href="ch-docs.html#s-changelogs" rel="section" title="12.7 Changelog files">
<link href="ap-pkg-binarypkg.html#s-pkg-bincreating" rel="section" title="B.1 Creating package files - dpkg-deb">
<link href="ap-pkg-binarypkg.html#s-pkg-controlarea" rel="section" title="B.2 Package control information files">
<link href="ap-pkg-binarypkg.html#s-pkg-controlfile" rel="section" title="B.3 The main control information file: control">
<link href="ap-pkg-binarypkg.html#sB.4" rel="section" title="B.4 Time Stamps">
<link href="ap-pkg-sourcepkg.html#s-pkg-sourcetools" rel="section" title="C.1 Tools for processing source packages">
<link href="ap-pkg-sourcepkg.html#s-pkg-sourcetree" rel="section" title="C.2 The Debian package source tree">
<link href="ap-pkg-sourcepkg.html#s-pkg-sourcearchives" rel="section" title="C.3 Source packages as archives">
<link href="ap-pkg-sourcepkg.html#sC.4" rel="section" title="C.4 Unpacking a Debian source package without dpkg-source">
<link href="ap-pkg-controlfields.html#sD.1" rel="section" title="D.1 Syntax of control files">
<link href="ap-pkg-controlfields.html#sD.2" rel="section" title="D.2 List of fields">
<link href="ap-pkg-conffiles.html#sE.1" rel="section" title="E.1 Automatic handling of configuration files by dpkg">
<link href="ap-pkg-conffiles.html#sE.2" rel="section" title="E.2 Fully-featured maintainer script configuration handling">
<link href="ch-archive.html#s-main" rel="subsection" title="2.2.1 The main archive area">
<link href="ch-archive.html#s-contrib" rel="subsection" title="2.2.2 The contrib archive area">
<link href="ch-archive.html#s-non-free" rel="subsection" title="2.2.3 The non-free archive area">
<link href="ch-binary.html#s3.2.1" rel="subsection" title="3.2.1 Version numbers based on dates">
<link href="ch-binary.html#s-synopsis" rel="subsection" title="3.4.1 The single line synopsis">
<link href="ch-binary.html#s-extendeddesc" rel="subsection" title="3.4.2 The extended description">
<link href="ch-binary.html#s-maintscriptprompt" rel="subsection" title="3.9.1 Prompting in maintainer scripts">
<link href="ch-source.html#s-debianrules-options" rel="subsection" title="4.9.1 debian/rules and DEB_BUILD_OPTIONS">
<link href="ch-controlfields.html#s-f-Source" rel="subsection" title="5.6.1 Source">
<link href="ch-controlfields.html#s-f-Maintainer" rel="subsection" title="5.6.2 Maintainer">
<link href="ch-controlfields.html#s-f-Uploaders" rel="subsection" title="5.6.3 Uploaders">
<link href="ch-controlfields.html#s-f-Changed-By" rel="subsection" title="5.6.4 Changed-By">
<link href="ch-controlfields.html#s-f-Section" rel="subsection" title="5.6.5 Section">
<link href="ch-controlfields.html#s-f-Priority" rel="subsection" title="5.6.6 Priority">
<link href="ch-controlfields.html#s-f-Package" rel="subsection" title="5.6.7 Package">
<link href="ch-controlfields.html#s-f-Architecture" rel="subsection" title="5.6.8 Architecture">
<link href="ch-controlfields.html#s-f-Essential" rel="subsection" title="5.6.9 Essential">
<link href="ch-controlfields.html#s5.6.10" rel="subsection" title="5.6.10 Package interrelationship fields: Depends, Pre-Depends, Recommends, Suggests, Breaks, Conflicts, Provides, Replaces, Enhances">
<link href="ch-controlfields.html#s-f-Standards-Version" rel="subsection" title="5.6.11 Standards-Version">
<link href="ch-controlfields.html#s-f-Version" rel="subsection" title="5.6.12 Version">
<link href="ch-controlfields.html#s-f-Description" rel="subsection" title="5.6.13 Description">
<link href="ch-controlfields.html#s-f-Distribution" rel="subsection" title="5.6.14 Distribution">
<link href="ch-controlfields.html#s-f-Date" rel="subsection" title="5.6.15 Date">
<link href="ch-controlfields.html#s-f-Format" rel="subsection" title="5.6.16 Format">
<link href="ch-controlfields.html#s-f-Urgency" rel="subsection" title="5.6.17 Urgency">
<link href="ch-controlfields.html#s-f-Changes" rel="subsection" title="5.6.18 Changes">
<link href="ch-controlfields.html#s-f-Binary" rel="subsection" title="5.6.19 Binary">
<link href="ch-controlfields.html#s-f-Installed-Size" rel="subsection" title="5.6.20 Installed-Size">
<link href="ch-controlfields.html#s-f-Files" rel="subsection" title="5.6.21 Files">
<link href="ch-controlfields.html#s-f-Closes" rel="subsection" title="5.6.22 Closes">
<link href="ch-controlfields.html#s-f-Homepage" rel="subsection" title="5.6.23 Homepage">
<link href="ch-controlfields.html#s-f-Checksums" rel="subsection" title="5.6.24 Checksums-Sha1 and Checksums-Sha256">
<link href="ch-controlfields.html#s-f-DM-Upload-Allowed" rel="subsection" title="5.6.25 DM-Upload-Allowed">
<link href="ch-relationships.html#s7.6.1" rel="subsection" title="7.6.1 Overwriting files in other packages">
<link href="ch-relationships.html#s7.6.2" rel="subsection" title="7.6.2 Replacing whole packages, forcing their removal">
<link href="ch-sharedlibs.html#s-ldconfig" rel="subsection" title="8.1.1 ldconfig">
<link href="ch-sharedlibs.html#s8.6.1" rel="subsection" title="8.6.1 The shlibs files present on the system">
<link href="ch-sharedlibs.html#s8.6.2" rel="subsection" title="8.6.2 How to use dpkg-shlibdeps and the shlibs files">
<link href="ch-sharedlibs.html#s-shlibs" rel="subsection" title="8.6.3 The shlibs File Format">
<link href="ch-sharedlibs.html#s8.6.4" rel="subsection" title="8.6.4 Providing a shlibs file">
<link href="ch-opersys.html#s-fhs" rel="subsection" title="9.1.1 File System Structure">
<link href="ch-opersys.html#s9.1.2" rel="subsection" title="9.1.2 Site-specific programs">
<link href="ch-opersys.html#s9.1.3" rel="subsection" title="9.1.3 The system-wide mail directory">
<link href="ch-opersys.html#s-fhs-run" rel="subsection" title="9.1.4 /run and /run/lock">
<link href="ch-opersys.html#s9.2.1" rel="subsection" title="9.2.1 Introduction">
<link href="ch-opersys.html#s9.2.2" rel="subsection" title="9.2.2 UID and GID classes">
<link href="ch-opersys.html#s-/etc/init.d" rel="subsection" title="9.3.1 Introduction">
<link href="ch-opersys.html#s-writing-init" rel="subsection" title="9.3.2 Writing the scripts">
<link href="ch-opersys.html#s9.3.3" rel="subsection" title="9.3.3 Interfacing with the initscript system">
<link href="ch-opersys.html#s9.3.3.1" rel="subsection" title="9.3.3.1 Managing the links">
<link href="ch-opersys.html#s9.3.3.2" rel="subsection" title="9.3.3.2 Running initscripts">
<link href="ch-opersys.html#s9.3.4" rel="subsection" title="9.3.4 Boot-time initialization">
<link href="ch-opersys.html#s9.3.5" rel="subsection" title="9.3.5 Example">
<link href="ch-opersys.html#s-cron-files" rel="subsection" title="9.5.1 Cron job file names">
<link href="ch-files.html#s10.7.1" rel="subsection" title="10.7.1 Definitions">
<link href="ch-files.html#s10.7.2" rel="subsection" title="10.7.2 Location">
<link href="ch-files.html#s10.7.3" rel="subsection" title="10.7.3 Behavior">
<link href="ch-files.html#s10.7.4" rel="subsection" title="10.7.4 Sharing configuration files">
<link href="ch-files.html#s10.7.5" rel="subsection" title="10.7.5 User configuration files (&quot;dotfiles&quot;)">
<link href="ch-files.html#s10.9.1" rel="subsection" title="10.9.1 The use of dpkg-statoverride">
<link href="ch-customized-programs.html#s-arch-wildcard-spec" rel="subsection" title="11.1.1 Architecture wildcards">
<link href="ch-customized-programs.html#s11.8.1" rel="subsection" title="11.8.1 Providing X support and package priorities">
<link href="ch-customized-programs.html#s11.8.2" rel="subsection" title="11.8.2 Packages providing an X server">
<link href="ch-customized-programs.html#s11.8.3" rel="subsection" title="11.8.3 Packages providing a terminal emulator">
<link href="ch-customized-programs.html#s11.8.4" rel="subsection" title="11.8.4 Packages providing a window manager">
<link href="ch-customized-programs.html#s11.8.5" rel="subsection" title="11.8.5 Packages providing fonts">
<link href="ch-customized-programs.html#s-appdefaults" rel="subsection" title="11.8.6 Application defaults files">
<link href="ch-customized-programs.html#s11.8.7" rel="subsection" title="11.8.7 Installation directory issues">
<link href="ch-docs.html#s-copyrightformat" rel="subsection" title="12.5.1 Machine-readable copyright information">
<link href="ap-pkg-sourcepkg.html#s-pkg-dpkg-source" rel="subsection" title="C.1.1 dpkg-source - packs and unpacks Debian source packages">
<link href="ap-pkg-sourcepkg.html#s-pkg-dpkg-buildpackage" rel="subsection" title="C.1.2 dpkg-buildpackage - overall package-building control script">
<link href="ap-pkg-sourcepkg.html#s-pkg-dpkg-gencontrol" rel="subsection" title="C.1.3 dpkg-gencontrol - generates binary package control files">
<link href="ap-pkg-sourcepkg.html#s-pkg-dpkg-shlibdeps" rel="subsection" title="C.1.4 dpkg-shlibdeps - calculates shared library dependencies">
<link href="ap-pkg-sourcepkg.html#s-pkg-dpkg-distaddfile" rel="subsection" title="C.1.5 dpkg-distaddfile - adds a file to debian/files">
<link href="ap-pkg-sourcepkg.html#s-pkg-dpkg-genchanges" rel="subsection" title="C.1.6 dpkg-genchanges - generates a .changes upload control file">
<link href="ap-pkg-sourcepkg.html#s-pkg-dpkg-parsechangelog" rel="subsection" title="C.1.7 dpkg-parsechangelog - produces parsed representation of a changelog">
<link href="ap-pkg-sourcepkg.html#s-pkg-dpkg-architecture" rel="subsection" title="C.1.8 dpkg-architecture - information about the build and host system">
<link href="ap-pkg-sourcepkg.html#s-pkg-debianrules" rel="subsection" title="C.2.1 debian/rules - the main building script">
<link href="ap-pkg-sourcepkg.html#s-pkg-srcsubstvars" rel="subsection" title="C.2.2 debian/substvars and variable substitutions">
<link href="ap-pkg-sourcepkg.html#sC.2.3" rel="subsection" title="C.2.3 debian/files">
<link href="ap-pkg-sourcepkg.html#sC.2.4" rel="subsection" title="C.2.4 debian/tmp">
<link href="ap-pkg-sourcepkg.html#sC.4.1" rel="subsection" title="C.4.1 Restrictions on objects in source packages">
<link href="ap-pkg-controlfields.html#s-pkg-f-Filename" rel="subsection" title="D.2.1 Filename and MSDOS-Filename">
<link href="ap-pkg-controlfields.html#s-pkg-f-Size" rel="subsection" title="D.2.2 Size and MD5sum">
<link href="ap-pkg-controlfields.html#s-pkg-f-Status" rel="subsection" title="D.2.3 Status">
<link href="ap-pkg-controlfields.html#s-pkg-f-Config-Version" rel="subsection" title="D.2.4 Config-Version">
<link href="ap-pkg-controlfields.html#s-pkg-f-Conffiles" rel="subsection" title="D.2.5 Conffiles">
<link href="ap-pkg-controlfields.html#sD.2.6" rel="subsection" title="D.2.6 Obsolete fields">

</head>

<body>

<p><a name="ch-sharedlibs"></a></p>
<hr>

<p>
[ <a href="ch-relationships.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ <a href="ch-scope.html">1</a> ]
[ <a href="ch-archive.html">2</a> ]
[ <a href="ch-binary.html">3</a> ]
[ <a href="ch-source.html">4</a> ]
[ <a href="ch-controlfields.html">5</a> ]
[ <a href="ch-maintainerscripts.html">6</a> ]
[ <a href="ch-relationships.html">7</a> ]
[ 8 ]
[ <a href="ch-opersys.html">9</a> ]
[ <a href="ch-files.html">10</a> ]
[ <a href="ch-customized-programs.html">11</a> ]
[ <a href="ch-docs.html">12</a> ]
[ <a href="ap-pkg-scope.html">A</a> ]
[ <a href="ap-pkg-binarypkg.html">B</a> ]
[ <a href="ap-pkg-sourcepkg.html">C</a> ]
[ <a href="ap-pkg-controlfields.html">D</a> ]
[ <a href="ap-pkg-conffiles.html">E</a> ]
[ <a href="ap-pkg-alternatives.html">F</a> ]
[ <a href="ap-pkg-diversions.html">G</a> ]
[ <a href="ch-opersys.html">next</a> ]
</p>

<hr>

<h1>
Debian Policy Manual
<br>Chapter 8 - Shared libraries
</h1>

<hr>

<p>
Packages containing shared libraries must be constructed with a little care to
make sure that the shared library is always available.  This is especially
important for packages whose shared libraries are vitally important, such as
the C library (currently <samp>libc6</samp>).
</p>

<p>
This section deals only with public shared libraries: shared libraries that are
placed in directories searched by the dynamic linker by default or which are
intended to be linked against normally and possibly used by other, independent
packages.  Shared libraries that are internal to a particular package or that
are only loaded as dynamic modules are not covered by this section and are not
subject to its requirements.
</p>

<p>
A shared library is identified by the <samp>SONAME</samp> attribute stored in
its dynamic section.  When a binary is linked against a shared library, the
<samp>SONAME</samp> of the shared library is recorded in the binary's
<samp>NEEDED</samp> section so that the dynamic linker knows that library must
be loaded at runtime.  The shared library file's full name (which usually
contains additional version information not needed in the <samp>SONAME</samp>)
is therefore normally not referenced directly.  Instead, the shared library is
loaded by its <samp>SONAME</samp>, which exists on the file system as a symlink
pointing to the full name of the shared library.  This symlink must be provided
by the package.  <a href="#s-sharedlibs-runtime">Run-time shared libraries,
Section 8.1</a> describes how to do this.  [<a href="footnotes.html#f56"
name="fr56">56</a>]
</p>

<p>
When linking a binary or another shared library against a shared library, the
<samp>SONAME</samp> for that shared library is not yet known.  Instead, the
shared library is found by looking for a file matching the library name with
<samp>.so</samp> appended.  This file exists on the file system as a symlink
pointing to the shared library.
</p>

<p>
Shared libraries are normally split into several binary packages.  The
<samp>SONAME</samp> symlink is installed by the runtime shared library package,
and the bare <samp>.so</samp> symlink is installed in the development package
since it's only used when linking binaries or shared libraries.  However, there
are some exceptions for unusual shared libraries or for shared libraries that
are also loaded as dynamic modules by other programs.
</p>

<p>
This section is primarily concerned with how the separation of shared libraries
into multiple packages should be done and how dependencies on and between
shared library binary packages are managed in Debian.  <a
href="ch-files.html#s-libraries">Libraries, Section 10.2</a> should be read in
conjunction with this section and contains additional rules for the files
contained in the shared library packages.
</p>

<hr>

<h2><a name="s-sharedlibs-runtime"></a>8.1 Run-time shared libraries</h2>

<p>
The run-time shared library must be placed in a package whose name changes
whenever the <samp>SONAME</samp> of the shared library changes.  This allows
several versions of the shared library to be installed at the same time,
allowing installation of the new version of the shared library without
immediately breaking binaries that depend on the old version.  Normally, the
run-time shared library and its <samp>SONAME</samp> symlink should be placed in
a package named <code><var>libraryname</var><var>soversion</var></code>, where
<var>soversion</var> is the version number in the <samp>SONAME</samp> of the
shared library.  See <a href="#s-shlibs">The <code>shlibs</code> File Format,
Section 8.6.3</a> for detailed information on how to determine this version.
Alternatively, if it would be confusing to directly append <var>soversion</var>
to <var>libraryname</var> (if, for example, <var>libraryname</var> itself ends
in a number), you should use
<code><var>libraryname</var>-<var>soversion</var></code> instead.
</p>

<p>
If you have several shared libraries built from the same source tree, you may
lump them all together into a single shared library package provided that all
of their <samp>SONAME</samp>s will always change together.  Be aware that this
is not normally the case, and if the <samp>SONAME</samp>s do not change
together, upgrading such a merged shared library package will be unnecessarily
difficult because of file conflicts with the old version of the package.  When
in doubt, always split shared library packages so that each binary package
installs a single shared library.
</p>

<p>
Every time the shared library ABI changes in a way that may break binaries
linked against older versions of the shared library, the <samp>SONAME</samp> of
the library and the corresponding name for the binary package containing the
runtime shared library should change.  Normally, this means the
<samp>SONAME</samp> should change any time an interface is removed from the
shared library or the signature of an interface (the number of parameters or
the types of parameters that it takes, for example) is changed.  This practice
is vital to allowing clean upgrades from older versions of the package and
clean transitions between the old ABI and new ABI without having to upgrade
every affected package simultaneously.
</p>

<p>
The <samp>SONAME</samp> and binary package name need not, and indeed normally
should not, change if new interfaces are added but none are removed or changed,
since this will not break binaries linked against the old shared library.
Correct versioning of dependencies on the newer shared library by binaries that
use the new interfaces is handled via the <a
href="#s-sharedlibs-shlibdeps"><samp>shlibs</samp> system</a> or via symbols
files (see <code>deb-symbols(5)</code>).
</p>

<p>
The package should install the shared libraries under their normal names.  For
example, the <code>libgdbm3</code> package should install
<code>libgdbm.so.3.0.0</code> as <code>/usr/lib/libgdbm.so.3.0.0</code>.  The
files should not be renamed or re-linked by any <code>prerm</code> or
<code>postrm</code> scripts; <code>dpkg</code> will take care of renaming
things safely without affecting running programs, and attempts to interfere
with this are likely to lead to problems.
</p>

<p>
Shared libraries should not be installed executable, since the dynamic linker
does not require this and trying to execute a shared library usually results in
a core dump.
</p>

<p>
The run-time library package should include the symbolic link for the
<samp>SONAME</samp> that <code>ldconfig</code> would create for the shared
libraries.  For example, the <code>libgdbm3</code> package should include a
symbolic link from <code>/usr/lib/libgdbm.so.3</code> to
<code>libgdbm.so.3.0.0</code>.  This is needed so that the dynamic linker (for
example <code>ld.so</code> or <code>ld-linux.so.*</code>) can find the library
between the time that <code>dpkg</code> installs it and the time that
<code>ldconfig</code> is run in the <code>postinst</code> script.[<a
href="footnotes.html#f57" name="fr57">57</a>]
</p>

<hr>

<h3><a name="s-ldconfig"></a>8.1.1 <samp>ldconfig</samp></h3>

<p>
Any package installing shared libraries in one of the default library
directories of the dynamic linker (which are currently <code>/usr/lib</code>
and <code>/lib</code>) or a directory that is listed in
<code>/etc/ld.so.conf</code>[<a href="footnotes.html#f58" name="fr58">58</a>]
must use <code>ldconfig</code> to update the shared library system.
</p>

<p>
The package maintainer scripts must only call <code>ldconfig</code> under these
circumstances:
</p>
<ul>
<li>
<p>
When the <code>postinst</code> script is run with a first argument of
<samp>configure</samp>, the script must call <code>ldconfig</code>, and may
optionally invoke <code>ldconfig</code> at other times.
</p>
</li>
<li>
<p>
When the <code>postrm</code> script is run with a first argument of
<samp>remove</samp>, the script should call <code>ldconfig</code>.
</p>
</li>
</ul>

<p>
[<a href="footnotes.html#f59" name="fr59">59</a>]
</p>

<hr>

<h2><a name="s-sharedlibs-support-files"></a>8.2 Shared library support files</h2>

<p>
If your package contains files whose names do not change with each change in
the library shared object version, you must not put them in the shared library
package.  Otherwise, several versions of the shared library cannot be installed
at the same time without filename clashes, making upgrades and transitions
unnecessarily difficult.
</p>

<p>
It is recommended that supporting files and run-time support programs that do
not need to be invoked manually by users, but are nevertheless required for the
package to function, be placed (if they are binary) in a subdirectory of
<code>/usr/lib</code>, preferably under
<code>/usr/lib/</code><var>package-name</var>.  If the program or file is
architecture independent, the recommendation is for it to be placed in a
subdirectory of <code>/usr/share</code> instead, preferably under
<code>/usr/share/</code><var>package-name</var>.  Following the
<var>package-name</var> naming convention ensures that the file names change
when the shared object version changes.
</p>

<p>
Run-time support programs that use the shared library but are not required for
the library to function or files used by the shared library that can be used by
any version of the shared library package should instead be put in a separate
package.  This package might typically be named
<code><var>libraryname</var>-tools</code>; note the absence of the
<var>soversion</var> in the package name.
</p>

<p>
Files and support programs only useful when compiling software against the
library should be included in the development package for the library.[<a
href="footnotes.html#f60" name="fr60">60</a>]
</p>

<hr>

<h2><a name="s-sharedlibs-static"></a>8.3 Static libraries</h2>

<p>
The static library (<code><var>libraryname.a</var></code>) is usually provided
in addition to the shared version.  It is placed into the development package
(see below).
</p>

<p>
In some cases, it is acceptable for a library to be available in static form
only; these cases include:
</p>
<ul>
<li>
<p>
libraries for languages whose shared library support is immature or unstable
</p>
</li>
</ul>
<ul>
<li>
<p>
libraries whose interfaces are in flux or under development (commonly the case
when the library's major version number is zero, or where the ABI breaks across
patchlevels)
</p>
</li>
</ul>
<ul>
<li>
<p>
libraries which are explicitly intended to be available only in static form by
their upstream author(s)
</p>
</li>
</ul>

<hr>

<h2><a name="s-sharedlibs-dev"></a>8.4 Development files</h2>

<p>
If there are development files associated with a shared library, the source
package needs to generate a binary development package named
<code><var>libraryname</var><var>soversion</var>-dev</code>, or if you prefer
only to support one development version at a time,
<code><var>libraryname</var>-dev</code>.  Installing the development package
must result in installation of all the development files necessary for
compiling programs against that shared library.[<a href="footnotes.html#f61"
name="fr61">61</a>]
</p>

<p>
In case several development versions of a library exist, you may need to use
<code>dpkg</code>'s Conflicts mechanism (see <a
href="ch-relationships.html#s-conflicts">Conflicting binary packages -
<samp>Conflicts</samp>, Section 7.4</a>) to ensure that the user only installs
one development version at a time (as different development versions are likely
to have the same header files in them, which would cause a filename clash if
both were unpacked).
</p>

<p>
The development package should contain a symlink for the associated shared
library without a version number.  For example, the <code>libgdbm-dev</code>
package should include a symlink from <code>/usr/lib/libgdbm.so</code> to
<code>libgdbm.so.3.0.0</code>.  This symlink is needed by the linker
(<code>ld</code>) when compiling packages, as it will only look for
<code>libgdbm.so</code> when compiling dynamically.
</p>

<p>
If the package provides Ada Library Information (<code>*.ali</code>) files for
use with GNAT, these files must be installed read-only (mode 0444) so that GNAT
will not attempt to recompile them.  This overrides the normal file mode
requirements given in <a href="ch-files.html#s-permissions-owners">Permissions
and owners, Section 10.9</a>.
</p>

<hr>

<h2><a name="s-sharedlibs-intradeps"></a>8.5 Dependencies between the packages of the same library</h2>

<p>
Typically the development version should have an exact version dependency on
the runtime library, to make sure that compilation and linking happens
correctly.  The <samp>${binary:Version}</samp> substitution variable can be
useful for this purpose.  [<a href="footnotes.html#f62" name="fr62">62</a>]
</p>

<hr>

<h2><a name="s-sharedlibs-shlibdeps"></a>8.6 Dependencies between the library and other packages - the <samp>shlibs</samp> system</h2>

<p>
If a package contains a binary or library which links to a shared library, we
must ensure that when the package is installed on the system, all of the
libraries needed are also installed.  This requirement led to the creation of
the <samp>shlibs</samp> system, which is very simple in its design: any package
which <em>provides</em> a shared library also provides information on the
package dependencies required to ensure the presence of this library, and any
package which <em>uses</em> a shared library uses this information to determine
the dependencies it requires.  The files which contain the mapping from shared
libraries to the necessary dependency information are called
<code>shlibs</code> files.
</p>

<p>
When a package is built which contains any shared libraries, it must provide a
<code>shlibs</code> file for other packages to use.  When a package is built
which contains any shared libraries or compiled binaries, it must run <a
href="ap-pkg-sourcepkg.html#s-pkg-dpkg-shlibdeps"><code>dpkg-shlibdeps</code></a>
on these to determine the libraries used and hence the dependencies needed by
this package.[<a href="footnotes.html#f63" name="fr63">63</a>]
</p>

<p>
In the following sections, we will first describe where the various
<samp>shlibs</samp> files are to be found, then how to use
<code>dpkg-shlibdeps</code>, and finally the <samp>shlibs</samp> file format
and how to create them if your package contains a shared library.
</p>

<hr>

<h3><a name="s8.6.1"></a>8.6.1 The <samp>shlibs</samp> files present on the system</h3>

<p>
There are several places where <samp>shlibs</samp> files are found.  The
following list gives them in the order in which they are read by <a
href="ap-pkg-sourcepkg.html#s-pkg-dpkg-shlibdeps"><code>dpkg-shlibdeps</code></a>.
(The first one which gives the required information is used.)
</p>
<ul>
<li>
<p>
<code>debian/shlibs.local</code>
</p>

<p>
This lists overrides for this package.  This file should normally not be used,
but may be needed temporarily in unusual situations to work around bugs in
other packages, or in unusual cases where the normally declared dependency
information in the installed <code>shlibs</code> file for a library cannot be
used.  This file overrides information obtained from any other source.
</p>
</li>
</ul>
<ul>
<li>
<p>
<code>/etc/dpkg/shlibs.override</code>
</p>

<p>
This lists global overrides.  This list is normally empty.  It is maintained by
the local system administrator.
</p>
</li>
</ul>
<ul>
<li>
<p>
<code>DEBIAN/shlibs</code> files in the &quot;build directory&quot;
</p>

<p>
When packages are being built, any <code>debian/shlibs</code> files are copied
into the control information file area of the temporary build directory and
given the name <code>shlibs</code>.  These files give details of any shared
libraries included in the same package.[<a href="footnotes.html#f64"
name="fr64">64</a>]
</p>
</li>
</ul>
<ul>
<li>
<p>
<code>/var/lib/dpkg/info/*.shlibs</code>
</p>

<p>
These are the <code>shlibs</code> files corresponding to all of the packages
installed on the system, and are maintained by the relevant package
maintainers.
</p>
</li>
</ul>
<ul>
<li>
<p>
<code>/etc/dpkg/shlibs.default</code>
</p>

<p>
This file lists any shared libraries whose packages have failed to provide
correct <code>shlibs</code> files.  It was used when the <code>shlibs</code>
setup was first introduced, but it is now normally empty.  It is maintained by
the <samp>dpkg</samp> maintainer.
</p>
</li>
</ul>

<hr>

<h3><a name="s8.6.2"></a>8.6.2 How to use <code>dpkg-shlibdeps</code> and the <code>shlibs</code> files</h3>

<p>
Put a call to <a
href="ap-pkg-sourcepkg.html#s-pkg-dpkg-shlibdeps"><code>dpkg-shlibdeps</code></a>
into your <code>debian/rules</code> file.  If your package contains only
compiled binaries and libraries (but no scripts), you can use a command such
as:
</p>
<pre>
     dpkg-shlibdeps debian/tmp/usr/bin/* debian/tmp/usr/sbin/* \
       debian/tmp/usr/lib/*
</pre>

<p>
Otherwise, you will need to explicitly list the compiled binaries and
libraries.[<a href="footnotes.html#f65" name="fr65">65</a>]
</p>

<p>
This command puts the dependency information into the
<code>debian/substvars</code> file, which is then used by
<code>dpkg-gencontrol</code>.  You will need to place a
<samp>${shlibs:Depends}</samp> variable in the <samp>Depends</samp> field in
the control file for this to work.
</p>

<p>
If you have multiple binary packages, you will need to call
<code>dpkg-shlibdeps</code> on each one which contains compiled libraries or
binaries.  In such a case, you will need to use the <samp>-T</samp> option to
the <samp>dpkg</samp> utilities to specify a different <code>substvars</code>
file.
</p>

<p>
If you are creating a udeb for use in the Debian Installer, you will need to
specify that <code>dpkg-shlibdeps</code> should use the dependency line of type
<samp>udeb</samp> by adding the <samp>-tudeb</samp> option[<a
href="footnotes.html#f66" name="fr66">66</a>].  If there is no dependency line
of type <samp>udeb</samp> in the <code>shlibs</code> file,
<code>dpkg-shlibdeps</code> will fall back to the regular dependency line.
</p>

<p>
For more details on <code>dpkg-shlibdeps</code>, please see <a
href="ap-pkg-sourcepkg.html#s-pkg-dpkg-shlibdeps"><code>dpkg-shlibdeps</code> -
calculates shared library dependencies, Section C.1.4</a> and
<code>dpkg-shlibdeps(1)</code>.
</p>

<hr>

<h3><a name="s-shlibs"></a>8.6.3 The <code>shlibs</code> File Format</h3>

<p>
Each <code>shlibs</code> file has the same format.  Lines beginning with
<samp>#</samp> are considered to be comments and are ignored.  Each line is of
the form:
</p>
<pre>
     [<var>type</var>: ]<var>library-name</var> <var>soname-version</var> <var>dependencies ...</var>
</pre>

<p>
We will explain this by reference to the example of the <samp>zlib1g</samp>
package, which (at the time of writing) installs the shared library
<code>/usr/lib/libz.so.1.1.3</code>.
</p>

<p>
<var>type</var> is an optional element that indicates the type of package for
which the line is valid.  The only type currently in use is <samp>udeb</samp>.
The colon and space after the type are required.
</p>

<p>
<var>library-name</var> is the name of the shared library, in this case
<samp>libz</samp>.  (This must match the name part of the soname, see below.)
</p>

<p>
<var>soname-version</var> is the version part of the soname of the library.
The soname is the thing that must exactly match for the library to be
recognized by the dynamic linker, and is usually of the form
<samp><var>name</var>.so.<var>major-version</var></samp>, in our example,
<samp>libz.so.1</samp>.[<a href="footnotes.html#f67" name="fr67">67</a>] The
version part is the part which comes after <samp>.so.</samp>, so in our case,
it is <samp>1</samp>.  The soname may instead be of the form
<samp><var>name</var>-<var>major-version</var>.so</samp>, such as
<samp>libdb-4.8.so</samp>, in which case the name would be <samp>libdb</samp>
and the version would be <samp>4.8</samp>.
</p>

<p>
<var>dependencies</var> has the same syntax as a dependency field in a binary
package control file.  It should give details of which packages are required to
satisfy a binary built against the version of the library contained in the
package.  See <a href="ch-relationships.html#s-depsyntax">Syntax of
relationship fields, Section 7.1</a> for details.
</p>

<p>
In our example, if the first version of the <samp>zlib1g</samp> package which
contained a minor number of at least <samp>1.3</samp> was <var>1:1.1.3-1</var>,
then the <samp>shlibs</samp> entry for this library could say:
</p>
<pre>
     libz 1 zlib1g (&gt;= 1:1.1.3)
</pre>

<p>
The version-specific dependency is to avoid warnings from the dynamic linker
about using older shared libraries with newer binaries.
</p>

<p>
As zlib1g also provides a udeb containing the shared library, there would also
be a second line:
</p>
<pre>
     udeb: libz 1 zlib1g-udeb (&gt;= 1:1.1.3)
</pre>

<hr>

<h3><a name="s8.6.4"></a>8.6.4 Providing a <code>shlibs</code> file</h3>

<p>
If your package provides a shared library, you need to create a
<code>shlibs</code> file following the format described above.  It is usual to
call this file <code>debian/shlibs</code> (but if you have multiple binary
packages, you might want to call it
<code>debian/shlibs.<var>package</var></code> instead).  Then let
<code>debian/rules</code> install it in the control information file area:
</p>
<pre>
     install -m644 debian/shlibs debian/tmp/DEBIAN
</pre>

<p>
or, in the case of a multi-binary package:
</p>
<pre>
     install -m644 debian/shlibs.<var>package</var> debian/<var>package</var>/DEBIAN/shlibs
</pre>

<p>
An alternative way of doing this is to create the <code>shlibs</code> file in
the control information file area directly from <code>debian/rules</code>
without using a <code>debian/shlibs</code> file at all,[<a
href="footnotes.html#f68" name="fr68">68</a>] since the
<code>debian/shlibs</code> file itself is ignored by
<code>dpkg-shlibdeps</code>.
</p>

<p>
As <code>dpkg-shlibdeps</code> reads the <code>DEBIAN/shlibs</code> files in
all of the binary packages being built from this source package, all of the
<code>DEBIAN/shlibs</code> files should be installed before
<code>dpkg-shlibdeps</code> is called on any of the binary packages.
</p>

<hr>

<p>
[ <a href="ch-relationships.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ <a href="ch-scope.html">1</a> ]
[ <a href="ch-archive.html">2</a> ]
[ <a href="ch-binary.html">3</a> ]
[ <a href="ch-source.html">4</a> ]
[ <a href="ch-controlfields.html">5</a> ]
[ <a href="ch-maintainerscripts.html">6</a> ]
[ <a href="ch-relationships.html">7</a> ]
[ 8 ]
[ <a href="ch-opersys.html">9</a> ]
[ <a href="ch-files.html">10</a> ]
[ <a href="ch-customized-programs.html">11</a> ]
[ <a href="ch-docs.html">12</a> ]
[ <a href="ap-pkg-scope.html">A</a> ]
[ <a href="ap-pkg-binarypkg.html">B</a> ]
[ <a href="ap-pkg-sourcepkg.html">C</a> ]
[ <a href="ap-pkg-controlfields.html">D</a> ]
[ <a href="ap-pkg-conffiles.html">E</a> ]
[ <a href="ap-pkg-alternatives.html">F</a> ]
[ <a href="ap-pkg-diversions.html">G</a> ]
[ <a href="ch-opersys.html">next</a> ]
</p>

<hr>

<p>
Debian Policy Manual
</p>

<address>
version 3.9.3.1, 2012-03-13<br>
<br>
<a href="ch-scope.html#s-authors">The Debian Policy Mailing List</a><br>
<br>
</address>
<hr>

</body>

</html>