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
|
#!/usr/bin/make -f
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
CFLAGS += -Wall -g
LDFLAGS += -Wl,-z,now -Wl,-z,relro
NS := claws-mail
CLAWS_VERSION = $(shell /bin/bash $(CURDIR)/debian/get-claws-ver.sh $(CURDIR))
CLAWS_LAST = $(shell /bin/bash $(CURDIR)/debian/get-claws-last.sh $(CURDIR))
IDIR := $(CURDIR)/debian
PDIR := $(CURDIR)/debian/manpages
GENDOCS := $(CURDIR)/debian/gendocs
GENXAMP := $(CURDIR)/debian/genexamples
MANPAGES := $(shell /bin/ls $(PDIR)/*.sgml | /bin/sed "s,sgml,1,g")
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2 -D_FORTIFY_SOURCE=2
endif
$(PDIR)/%.1: $(PDIR)/%.sgml
docbook-to-man $< > $@
manpages-stamp: $(MANPAGES)
pod2man $(CURDIR)/perl_plugin-*/cm_perl.pod \
> $(PDIR)/$(NS)-perl-filter.1
pod2man $(PDIR)/matcherrc2perlfilter.pl.pod \
> $(PDIR)/matcherrc2perlfilter.1
touch manpages-stamp
clean-manpages:
rm -f $(MANPAGES)
rm -f $(PDIR)/$(NS)-perl-filter.1 $(PDIR)/matcherrc2perlfilter.1
rm -f manpages-stamp
configure-stamp:
dh_testdir
cp $(IDIR)/configure $(IDIR)/Makefile $(CURDIR)
chmod +x $(CURDIR)/configure
$(CURDIR)/configure --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
$(shell dpkg-buildflags --export=configure)
touch configure-stamp
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp manpages-stamp
dh_testdir
$(MAKE) LDFLAGS="$(LDFLAGS)"
touch build-stamp
clean: clean-docs clean-examples clean-manpages
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
[ ! -f Makefile ] || $(MAKE) clean
-$(CURDIR)/configure --unconfigure
rm -f $(CURDIR)/configure $(CURDIR)/Makefile
# clean installdirs
rm -rf $(IDIR)/vcalendar-* \
$(IDIR)/perl_plugin-* \
$(IDIR)/rssyl-* \
$(IDIR)/mailmbox-* \
$(IDIR)/gtkhtml2_viewer-* \
$(IDIR)/acpi_notifier-* \
$(IDIR)/att_remover-* \
$(IDIR)/fetchinfo-plugin-* \
$(IDIR)/newmail-* \
$(IDIR)/notification_plugin-* \
$(IDIR)/attachwarner-* \
$(IDIR)/spam_report-* \
$(IDIR)/tnef_parse-* \
$(IDIR)/archive-* \
$(IDIR)/bsfilter_plugin-* \
$(IDIR)/fancy-* \
$(IDIR)/python_plugin-* \
$(IDIR)/address_keeper-* \
$(IDIR)/clamd-* \
$(IDIR)/gdata_plugin-*
dh_clean
install:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install DESTDIR=$(IDIR)
# _______________________________________[vcalendar-plugin]____
mv $(IDIR)/vcalendar-*/* \
$(IDIR)/$(NS)-vcalendar-plugin
# remove libical rests...
rm -rf $(IDIR)/$(NS)-vcalendar-plugin/usr/include
# ...and unwanted files
rm -f $(IDIR)/$(NS)-vcalendar-plugin/usr/lib/$(NS)/plugins/*.*a
# ____________________________________________[perl-filter]____
mv $(IDIR)/perl_plugin-*/* \
$(IDIR)/$(NS)-perl-filter
mkdir -p -m 755 $(IDIR)/$(NS)-perl-filter/usr/bin
install -m 755 $(CURDIR)/perl_plugin-*/tools/matcherrc2perlfilter.pl \
$(IDIR)/$(NS)-perl-filter/usr/bin/matcherrc2perlfilter
rm -f $(IDIR)/$(NS)-perl-filter/usr/lib/$(NS)/plugins/*.*a
# ___________________________________________[feeds-reader]____
mv $(IDIR)/rssyl-*/* \
$(IDIR)/$(NS)-feeds-reader
rm -f $(IDIR)/$(NS)-feeds-reader/usr/lib/$(NS)/plugins/*.*a
# ________________________________________[mailmbox-plugin]____
mv $(IDIR)/mailmbox-*/* \
$(IDIR)/$(NS)-mailmbox-plugin
rm -f $(IDIR)/$(NS)-mailmbox-plugin/usr/lib/$(NS)/plugins/*.*a
# ___________________________________________[html2-viewer]____
mv $(IDIR)/gtkhtml2_viewer-*/* \
$(IDIR)/$(NS)-html2-viewer
rm -f $(IDIR)/$(NS)-html2-viewer/usr/lib/$(NS)/plugins/*.*a
# __________________________________________[acpi-notifier]____
mv $(IDIR)/acpi_notifier-*/* \
$(IDIR)/$(NS)-acpi-notifier
rm -f $(IDIR)/$(NS)-acpi-notifier/usr/lib/$(NS)/plugins/*.*a
# _________________________________________[attach-remover]____
mv $(IDIR)/att_remover-*/* \
$(IDIR)/$(NS)-attach-remover
rm -f $(IDIR)/$(NS)-attach-remover/usr/lib/$(NS)/plugins/*.*a
# _______________________________________[fetchinfo-plugin]____
mv $(IDIR)/fetchinfo-plugin-*/* \
$(IDIR)/$(NS)-fetchinfo-plugin
rm -f $(IDIR)/$(NS)-fetchinfo-plugin/usr/lib/$(NS)/plugins/*.*a
# _________________________________________[newmail-plugin]____
mv $(IDIR)/newmail-*/* \
$(IDIR)/$(NS)-newmail-plugin
rm -f $(IDIR)/$(NS)-newmail-plugin/usr/lib/$(NS)/plugins/*.*a
# _________________________________________[multi-notifier]____
mv $(IDIR)/notification_plugin-*/* \
$(IDIR)/$(NS)-multi-notifier
rm -f $(IDIR)/$(NS)-multi-notifier/usr/lib/$(NS)/plugins/*.*a
# __________________________________________[attach-warner]____
mv $(IDIR)/attachwarner-*/* \
$(IDIR)/$(NS)-attach-warner
rm -f $(IDIR)/$(NS)-attach-warner/usr/lib/$(NS)/plugins/*.*a
# ____________________________________________[spam-report]____
mv $(IDIR)/spam_report-*/* \
$(IDIR)/$(NS)-spam-report
rm -f $(IDIR)/$(NS)-spam-report/usr/lib/$(NS)/plugins/*.*a
# ____________________________________________[tnef-parser]____
mv $(IDIR)/tnef_parse-*/* \
$(IDIR)/$(NS)-tnef-parser
rm -f $(IDIR)/$(NS)-tnef-parser/usr/lib/$(NS)/plugins/*.*a
# ________________________________________[archiver-plugin]____
mv $(IDIR)/archive-*/* \
$(IDIR)/$(NS)-archiver-plugin
rm -f $(IDIR)/$(NS)-archiver-plugin/usr/lib/$(NS)/plugins/*.*a
# ________________________________________[bsfilter-plugin]____
mv $(IDIR)/bsfilter_plugin-*/* \
$(IDIR)/$(NS)-bsfilter-plugin
rm -f $(IDIR)/$(NS)-bsfilter-plugin/usr/lib/$(NS)/plugins/*.*a
# ___________________________________________[fancy-plugin]____
mv $(IDIR)/fancy-*/* \
$(IDIR)/$(NS)-fancy-plugin
rm -f $(IDIR)/$(NS)-fancy-plugin/usr/lib/$(NS)/plugins/*.*a
# __________________________________________[python-plugin]____
mv $(IDIR)/python_plugin-*/* \
$(IDIR)/$(NS)-python-plugin
rm -f $(IDIR)/$(NS)-python-plugin/usr/lib/$(NS)/plugins/*.*a
# _________________________________________[address-keeper]____
mv $(IDIR)/address_keeper-*/* \
$(IDIR)/$(NS)-address-keeper
rm -f $(IDIR)/$(NS)-address-keeper/usr/lib/$(NS)/plugins/*.*a
# ___________________________________________[clamd-plugin]____
mv $(IDIR)/clamd-*/* \
$(IDIR)/$(NS)-clamd-plugin
rm -f $(IDIR)/$(NS)-clamd-plugin/usr/lib/$(NS)/plugins/*.*a
# ___________________________________________[gdata-plugin]____
mv $(IDIR)/gdata_plugin-*/* \
$(IDIR)/$(NS)-gdata-plugin
rm -f $(IDIR)/$(NS)-gdata-plugin/usr/lib/$(NS)/plugins/*.*a
generate-examples:
chmod +x $(GENXAMP)
$(GENXAMP) $(NS)-python-plugin python_plugin-*
clean-examples:
chmod +x $(GENXAMP)
$(GENXAMP) $(NS)-python-plugin --clean
generate-docs:
chmod +x $(GENDOCS)
$(GENDOCS) $(NS)-vcalendar-plugin vcalendar-*
$(GENDOCS) $(NS)-perl-filter perl_plugin-*
$(GENDOCS) $(NS)-feeds-reader rssyl-*
$(GENDOCS) $(NS)-mailmbox-plugin mailmbox-*
$(GENDOCS) $(NS)-html2-viewer gtkhtml2_viewer-*
$(GENDOCS) $(NS)-acpi-notifier acpi_notifier-*
$(GENDOCS) $(NS)-attach-remover att_remover-*
$(GENDOCS) $(NS)-fetchinfo-plugin fetchinfo-plugin-*
$(GENDOCS) $(NS)-newmail-plugin newmail-*
$(GENDOCS) $(NS)-multi-notifier notification_plugin-*
$(GENDOCS) $(NS)-attach-warner attachwarner-*
$(GENDOCS) $(NS)-spam-report spam_report-*
$(GENDOCS) $(NS)-tnef-parser tnef_parse-*
$(GENDOCS) $(NS)-archiver-plugin archive-*
$(GENDOCS) $(NS)-bsfilter-plugin bsfilter_plugin-*
$(GENDOCS) $(NS)-fancy-plugin fancy-*
$(GENDOCS) $(NS)-python-plugin python_plugin-*
$(GENDOCS) $(NS)-address-keeper address_keeper-*
$(GENDOCS) $(NS)-clamd-plugin clamd-*
$(GENDOCS) $(NS)-gdata-plugin gdata_plugin-*
clean-docs:
chmod +x $(GENDOCS)
$(GENDOCS) $(NS)-vcalendar-plugin --clean
$(GENDOCS) $(NS)-perl-filter --clean
$(GENDOCS) $(NS)-feeds-reader --clean
$(GENDOCS) $(NS)-mailmbox-plugin --clean
$(GENDOCS) $(NS)-html2-viewer --clean
$(GENDOCS) $(NS)-acpi-notifier --clean
$(GENDOCS) $(NS)-attach-remover --clean
$(GENDOCS) $(NS)-fetchinfo-plugin --clean
$(GENDOCS) $(NS)-newmail-plugin --clean
$(GENDOCS) $(NS)-multi-notifier --clean
$(GENDOCS) $(NS)-attach-warner --clean
$(GENDOCS) $(NS)-spam-report --clean
$(GENDOCS) $(NS)-tnef-parser --clean
$(GENDOCS) $(NS)-archiver-plugin --clean
$(GENDOCS) $(NS)-bsfilter-plugin --clean
$(GENDOCS) $(NS)-fancy-plugin --clean
$(GENDOCS) $(NS)-python-plugin --clean
$(GENDOCS) $(NS)-address-keeper --clean
$(GENDOCS) $(NS)-clamd-plugin --clean
$(GENDOCS) $(NS)-gdata-plugin --clean
binary-indep: generate-docs generate-examples
dh_testdir
dh_testroot
dh_installchangelogs -i
dh_installdocs -i
dh_installexamples -i
dh_installman -i
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i -- -VClaws-Version=$(CLAWS_VERSION) \
-VClaws-Last=$(CLAWS_LAST)
dh_md5sums -i
dh_builddeb -i
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs -a
dh_installchangelogs \
-p$(NS)-acpi-notifier acpi_notifier-*/ChangeLog
dh_installchangelogs \
-p$(NS)-attach-remover att_remover-*/ChangeLog
dh_installchangelogs \
-p$(NS)-feeds-reader rssyl-*/ChangeLog
dh_installchangelogs \
-p$(NS)-fetchinfo-plugin fetchinfo-plugin-*/ChangeLog
dh_installchangelogs \
-p$(NS)-html2-viewer gtkhtml2_viewer-*/ChangeLog
dh_installchangelogs \
-p$(NS)-mailmbox-plugin mailmbox-*/ChangeLog
dh_installchangelogs \
-p$(NS)-multi-notifier notification_plugin-*/ChangeLog
dh_installchangelogs \
-p$(NS)-newmail-plugin newmail-*/ChangeLog
dh_installchangelogs \
-p$(NS)-perl-filter perl_plugin-*/ChangeLog
dh_installchangelogs \
-p$(NS)-attach-warner attachwarner-*/ChangeLog
dh_installchangelogs \
-p$(NS)-spam-report spam_report-*/ChangeLog
dh_installchangelogs \
-p$(NS)-tnef-parser tnef_parse-*/ChangeLog
dh_installchangelogs \
-p$(NS)-archiver-plugin archive-*/ChangeLog
dh_installchangelogs \
-p$(NS)-bsfilter-plugin bsfilter_plugin-*/ChangeLog
dh_installchangelogs \
-p$(NS)-fancy-plugin fancy-*/ChangeLog
dh_installchangelogs \
-p$(NS)-python-plugin python_plugin-*/ChangeLog
dh_installchangelogs \
-p$(NS)-address-keeper address_keeper-*/ChangeLog
dh_installchangelogs \
-p$(NS)-clamd-plugin clamd-*/ChangeLog
dh_installchangelogs \
-p$(NS)-gdata-plugin gdata_plugin-*/ChangeLog
dh_installdocs -a
dh_installexamples -a
dh_installman -a
dh_link -a
dh_strip --dbg-package=claws-mail-extra-plugins-dbg
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps
dh_gencontrol -a -- -VClaws-Version=$(CLAWS_VERSION) \
-VClaws-Last=$(CLAWS_LAST)
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install generate-docs clean-docs generate-examples clean-examples clean-manpages
|