Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 include /usr/share/dpkg/architecture.mk
3
4 WITH_SHINE_VORBIS_TREMOR=-Dshine=disabled -Dvorbis=enabled -Dvorbisenc=enabled -Dtremor=disabled
5 ifeq ($(DEB_HOST_ARCH), armel)
6 WITH_SHINE_VORBIS_TREMOR=-Dshine=enabled -Dvorbis=disabled -Dvorbisenc=disabled -Dtremor=enabled
7 endif
8
9 # systemd, alsa and io_uring on linux arches only
10 ifeq ($(DEB_HOST_ARCH_OS), linux)
11 WITH_LINUX=-Dsystemd=enabled -Dalsa=enabled -Dio_uring=enabled
12 else
13 WITH_LINUX=-Dsystemd=disabled -Dalsa=disabled -Dio_uring=disabled
14 endif
15
16 # no smbclient on hurd-i386 (#815441)
17 ENABLE_SMBCLIENT=-Dsmbclient=enabled
18 ifeq ($(DEB_HOST_ARCH), hurd-i386)
19 ENABLE_SMBCLIENT=-Dsmbclient=disabled
20 endif
21
22
23 ###############################################################
24 ## Define Debian feature set (in configure summary order)
25 RUN_TESTS=-Dtest=true
26
27 # Archive support
28 ENABLE_ARCHIVES=-Dbzip2=enabled \
29 -Diso9660=enabled \
30 -Dzlib=enabled \
31 -Dzzip=enabled
32
33 # Autodiscovery support
34 ENABLE_AUTODISCOVERY=-Dneighbor=true \
35 -Dupnp=pupnp \
36 -Dzeroconf=avahi
37
38 # Client support
39 ENABLE_CLIENTS=-Dipv6=enabled \
40 -Dtcp=true \
41 -Dlocal_socket=true
42
43 # Storage support
44 ENABLE_STORAGE=-Dnfs=enabled \
45 ${ENABLE_SMBCLIENT} \
46 -Dwebdav=enabled
47
48 # File format support
49 ENABLE_FILEFORMATS=-Dfaad=enabled \
50 -Dadplug=enabled \
51 -Daudiofile=disabled \
52 -Dffmpeg=enabled \
53 -Dflac=enabled \
54 -Dfluidsynth=enabled \
55 -Dgme=enabled \
56 -Dmad=enabled \
57 -Dmikmod=enabled \
58 -Dmodplug=enabled \
59 -Dmpcdec=enabled \
60 -Dmpg123=enabled \
61 -Dopenmpt=enabled \
62 -Dopus=enabled \
63 -Dsidplay=enabled \
64 -Dsndfile=enabled \
65 -Dwavpack=enabled \
66 -Dwildmidi=enabled
67
68 # Other features
69 ENABLE_OTHER=-Dcue=true \
70 -Ddatabase=true \
71 -Dexpat=enabled \
72 -Dicu=enabled \
73 -Dlibmpdclient=enabled \
74 -Dnlohmann_json=enabled \
75 -Dinotify=true \
76 -Dsoxr=enabled \
77 -Dlibsamplerate=enabled \
78 -Dsqlite=enabled \
79 -Dsyslog=enabled \
80 -Dpcre=enabled
81
82 # Metadata support
83 ENABLE_METADATA=-Did3tag=enabled \
84 -Dchromaprint=enabled
85
86 # Playback support
87 # Note: ALSA is in WITH_LINUX
88 ENABLE_PLAYBACKS=-Dfifo=true \
89 -Dsndio=enabled \
90 -Drecorder=true \
91 -Dhttpd=true \
92 -Djack=enabled \
93 -Dao=enabled \
94 -Doss=enabled \
95 -Dopenal=enabled \
96 -Dpipe=true \
97 -Dpipewire=enabled \
98 -Dpulse=enabled \
99 -Dshout=enabled \
100 -Dsnapcast=true
101
102 # Streaming encoder support
103 # Note: FLAC and Opus enabled under file formats, vorbisenc at top (!tremor)
104 ENABLE_ENCODERS=-Dlame=enabled \
105 -Dtwolame=disabled \
106 -Dwave_encoder=true \
107
108 # Streaming support
109 ENABLE_STREAMING=-Dcdio_paranoia=enabled \
110 -Dcurl=enabled \
111 -Dqobuz=disabled \
112 -Dmms=enabled
113
114 # Sphinx documentation
115 ENABLE_DOCUMENTATION=-Ddocumentation=enabled
116
117 ###############################################################
118
119
120 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
121
122 %:
123 dh $@ --with sphinxdoc
124
125 override_dh_auto_configure:
126 dh_auto_configure -- -Db_ndebug=true $(WITH_SHINE_VORBIS_TREMOR) $(WITH_LINUX) \
127 $(RUN_TESTS) \
128 $(ENABLE_ARCHIVES) \
129 $(ENABLE_AUTODISCOVERY) \
130 $(ENABLE_CLIENTS) \
131 $(ENABLE_STORAGE) \
132 $(ENABLE_FILEFORMATS) \
133 $(ENABLE_OTHER) \
134 $(ENABLE_METADATA) \
135 $(ENABLE_PLAYBACKS) \
136 $(ENABLE_ENCODERS) \
137 $(ENABLE_STREAMING) \
138 $(ENABLE_DOCUMENTATION)
139
140 override_dh_installchangelogs:
141 dh_installchangelogs NEWS
142 rm debian/mpd/usr/share/doc/mpd/COPYING debian/mpd/usr/share/doc/mpd/NEWS debian/mpd/usr/share/doc/mpd/README.md
143
144 override_dh_installsystemd:
145 dh_installsystemd --no-enable --no-start
146
147 override_dh_installsystemduser:
148 dh_installsystemduser --no-enable