-ifeq ($(BUILD_SSL),1)
- dh_installdeb -a
- #dh_makeshlibs -p $(RUNTIME_NAME) -V'libyaz 1 yaz-runtime-ssl' -V'libyazthread 1 yaz-runtime-ssl'
- dh_shlibdeps -p $(RUNTIME_NAME) -- debian/$(RUNTIME_NAME)/usr/lib/*.so
- dh_shlibdeps -p $(DEVEL_NAME) -- debian/$(DEVEL_NAME)/usr/bin/*
- echo "libyaz 1 $(RUNTIME_NAME)" > debian/$(RUNTIME_NAME)/DEBIAN/shlibs
- echo "libyazthread 1 $(RUNTIME_NAME)" >> debian/$(RUNTIME_NAME)/DEBIAN/shlibs
- echo "libyazmalloc 1 $(RUNTIME_NAME)" >> debian/$(RUNTIME_NAME)/DEBIAN/shlibs
- chmod 644 debian/$(RUNTIME_NAME)/DEBIAN/shlibs
-
-# dh_shlibdeps -a -- debian/yaz-runtime-ssl/usr/lib/*.so debian/yaz-runtime-ssl/usr/bin/*
- dh_gencontrol -p $(DEVEL_NAME) -u-DDepends="$(RUNTIME_NAME)"
- dh_gencontrol -p $(RUNTIME_NAME) -u-DConflicts=yaz-runtime
- dh_gencontrol -a
+ dh_installdeb -p yaz-runtime
+ dh_installdeb -p yaz-devel
+ dh_installman -p yaz-devel doc/yaz-config.1
+ dh_undocumented -p yaz-devel yaz-comp.1
+ dh_installman -p yaz-runtime doc/yaz-client.1 doc/yaz-ztest.8 doc/yaz.7 doc/zoomsh.1
+ echo "libyaz 1 yaz-runtime" > debian/yaz-runtime/DEBIAN/shlibs
+ echo "libyazthread 1 yaz-runtime" >> debian/yaz-runtime/DEBIAN/shlibs
+ echo "libyazmalloc 1 yaz-runtime" >> debian/yaz-runtime/DEBIAN/shlibs
+ chmod 644 debian/yaz-runtime/DEBIAN/shlibs
+ dh_shlibdeps -p yaz-runtime $(LOCAL_LINK)
+ifeq ($(YAZ_WITH_SSL),1)
+ dh_installdeb -p yaz-ssl
+ dh_installman -p yaz-ssl doc/yaz-client-ssl.1 doc/yaz-ztest-ssl.8
+ echo "libyazssl 1 yaz-ssl" >> debian/yaz-ssl/DEBIAN/shlibs
+ chmod 644 debian/yaz-ssl/DEBIAN/shlibs
+ dh_shlibdeps -p yaz-ssl $(LOCAL_LINK)
+ cat debian/postinst >> debian/yaz-ssl/DEBIAN/postinst
+endif
+ cat debian/postinst >> debian/yaz-runtime/DEBIAN/postinst