| 1 |
SUBDIRS=. po |
| 2 |
|
| 3 |
EXPORT_MODULES= \ |
| 4 |
cupshelpers/__init__.py \ |
| 5 |
cupshelpers/cupshelpers.py \ |
| 6 |
cupshelpers/installdriver.py \ |
| 7 |
cupshelpers/ppds.py \ |
| 8 |
cupshelpers/openprinting.py \ |
| 9 |
cupshelpers/xmldriverprefs.py |
| 10 |
|
| 11 |
EXPORT_MODULES_GEN= \ |
| 12 |
cupshelpers/config.py |
| 13 |
|
| 14 |
### Automake hooks for Distutils. |
| 15 |
# The distutils module doesn't understand srcdir != builddir, |
| 16 |
# so we copy in, along with the cupshelpers modules, into |
| 17 |
# the builddir for 'all', 'install-exec', and 'clean' hooks. |
| 18 |
.stamp-distutils-in-builddir: setup.py $(EXPORT_MODULES) |
| 19 |
if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \ |
| 20 |
cp $(top_srcdir)/setup.py .; \ |
| 21 |
$(mkdir_p) cupshelpers; \ |
| 22 |
for file in $(EXPORT_MODULES); do \ |
| 23 |
cp $(top_srcdir)/$$file $$file; \ |
| 24 |
done; \ |
| 25 |
fi |
| 26 |
touch .stamp-distutils-in-builddir |
| 27 |
|
| 28 |
dist-hook: mk-ChangeLog |
| 29 |
.PHONE: mk-ChangeLog |
| 30 |
mk-ChangeLog: |
| 31 |
if test -d .git; then \ |
| 32 |
$(top_srcdir)/gitlog-to-changelog \ |
| 33 |
--since=2009-05-01 -- --no-merges \ |
| 34 |
> $(distdir)/cl ; \ |
| 35 |
mv -f $(distdir)/cl $(distdir)/ChangeLog ; \ |
| 36 |
fi |
| 37 |
|
| 38 |
config.py: config.py.in Makefile |
| 39 |
sed \ |
| 40 |
-e "s|\@prefix\@|$(prefix)|" \ |
| 41 |
-e "s|\@datadir\@|$(datadir)|" \ |
| 42 |
-e "s|\@localedir\@|$(localedir)|" \ |
| 43 |
-e "s|\@VERSION\@|$(VERSION)|" \ |
| 44 |
-e "s|\@PACKAGE\@|$(PACKAGE)|" \ |
| 45 |
$< > $@ |
| 46 |
|
| 47 |
cupshelpers/config.py: cupshelpers/config.py.in Makefile |
| 48 |
$(mkdir_p) cupshelpers |
| 49 |
sed \ |
| 50 |
-e "s|\@prefix\@|$(prefix)|" \ |
| 51 |
-e "s|\@sysconfdir\@|$(sysconfdir)|" \ |
| 52 |
-e "s|\@cupsserverbindir\@|$(cupsserverbindir)|" \ |
| 53 |
$< > $@ |
| 54 |
|
| 55 |
dbus/org.fedoraproject.Config.Printing.service: dbus/org.fedoraproject.Config.Printing.service.in $(top_builddir)/config.status Makefile |
| 56 |
sed \ |
| 57 |
-e "s|\@bindir\@|$(bindir)|" \ |
| 58 |
$< >$@ |
| 59 |
|
| 60 |
# Use distutils to build the module. |
| 61 |
all-local: .stamp-distutils-in-builddir config.py cupshelpers/config.py |
| 62 |
$(PYTHON) setup.py build |
| 63 |
|
| 64 |
# Use distutils to install the module. |
| 65 |
install-exec-local: .stamp-distutils-in-builddir |
| •66 |
$(PYTHON) setup.py install --root $(DESTDIR) --prefix=$(prefix) --install-layout=deb |
| 67 |
|
| 68 |
# Uninstall the module, crossing our fingers that we know enough |
| 69 |
# about how distutils works to do this. Unfortunately, distutils |
| 70 |
# doesn't provide a way to do this itself. |
| 71 |
uninstall-local: |
| 72 |
rm -f $(DESTDIR)/$(pythondir)/cupshelpers*.egg-info |
| 73 |
rm -rf $(DESTDIR)/$(pythondir)/cupshelpers/__pycache__ |
| 74 |
rm -rf $(DESTDIR)/$(pythondir)/cupshelpers*.egg |
| 75 |
for file in $(EXPORT_MODULES) $(EXPORT_MODULES_GEN); do \ |
| 76 |
rm -f $(DESTDIR)/$(pythondir)/$$file*; \ |
| 77 |
done |
| 78 |
|
| 79 |
# Tell distutils to clean up. |
| 80 |
clean-local: |
| 81 |
-$(PYTHON) setup.py clean --all |
| 82 |
if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \ |
| 83 |
rm -f setup.py; \ |
| 84 |
for file in $(EXPORT_MODULES) \ |
| 85 |
$(EXPORT_MODULES_GEN); do \ |
| 86 |
rm -f $$file*; \ |
| 87 |
done; \ |
| 88 |
fi |
| 89 |
rm -f .stamp-distutils-in-builddir |
| 90 |
rm -f .stamp-man-pages-built |
| 91 |
|
| 92 |
nobase_pkgdata_SCRIPTS= \ |
| 93 |
check-device-ids.py \ |
| 94 |
pysmb.py \ |
| 95 |
scp-dbus-service.py \ |
| 96 |
system-config-printer.py \ |
| 97 |
install-printerdriver.py \ |
| 98 |
troubleshoot/__init__.py \ |
| 99 |
applet.py |
| 100 |
|
| 101 |
nobase_pkgdata_DATA= \ |
| 102 |
asyncconn.py \ |
| 103 |
asyncipp.py \ |
| 104 |
asyncpk1.py \ |
| 105 |
authconn.py \ |
| 106 |
config.py \ |
| 107 |
cupspk.py \ |
| 108 |
debug.py \ |
| 109 |
dnssdresolve.py \ |
| 110 |
errordialogs.py \ |
| 111 |
HIG.py \ |
| 112 |
firewallsettings.py \ |
| 113 |
gui.py \ |
| 114 |
gtkinklevel.py \ |
| 115 |
installpackage.py \ |
| 116 |
jobviewer.py \ |
| 117 |
killtimer.py \ |
| 118 |
monitor.py \ |
| 119 |
newprinter.py \ |
| 120 |
OpenPrintingRequest.py \ |
| 121 |
options.py \ |
| 122 |
optionwidgets.py \ |
| 123 |
PhysicalDevice.py \ |
| 124 |
ppdcache.py \ |
| 125 |
ppdippstr.py \ |
| 126 |
ppdsloader.py \ |
| 127 |
printerproperties.py \ |
| 128 |
probe_printer.py \ |
| 129 |
SearchCriterion.py \ |
| 130 |
serversettings.py \ |
| 131 |
smburi.py \ |
| 132 |
statereason.py \ |
| 133 |
timedops.py \ |
| 134 |
ToolbarSearchEntry.py \ |
| 135 |
userdefault.py \ |
| 136 |
ui/AboutDialog.ui \ |
| 137 |
ui/ConnectDialog.ui \ |
| 138 |
ui/ConnectingDialog.ui \ |
| 139 |
ui/InstallDialog.ui \ |
| 140 |
ui/JobsWindow.ui \ |
| 141 |
ui/NewPrinterName.ui \ |
| 142 |
ui/NewPrinterWindow.ui \ |
| 143 |
ui/PrinterPropertiesDialog.ui \ |
| 144 |
ui/PrintersWindow.ui \ |
| 145 |
ui/ServerSettingsDialog.ui \ |
| 146 |
ui/SMBBrowseDialog.ui \ |
| 147 |
ui/statusicon_popupmenu.ui \ |
| 148 |
ui/WaitWindow.ui \ |
| 149 |
icons/i-network-printer.png \ |
| 150 |
troubleshoot/base.py \ |
| 151 |
troubleshoot/CheckLocalServerPublishing.py \ |
| 152 |
troubleshoot/CheckNetworkServerSanity.py \ |
| 153 |
troubleshoot/CheckPPDSanity.py \ |
| 154 |
troubleshoot/CheckPrinterSanity.py \ |
| 155 |
troubleshoot/CheckSELinux.py \ |
| 156 |
troubleshoot/CheckUSBPermissions.py \ |
| 157 |
troubleshoot/ChooseNetworkPrinter.py \ |
| 158 |
troubleshoot/ChoosePrinter.py \ |
| 159 |
troubleshoot/DeviceListed.py \ |
| 160 |
troubleshoot/ErrorLogCheckpoint.py \ |
| 161 |
troubleshoot/ErrorLogFetch.py \ |
| 162 |
troubleshoot/ErrorLogParse.py \ |
| 163 |
troubleshoot/Locale.py \ |
| 164 |
troubleshoot/LocalOrRemote.py \ |
| 165 |
troubleshoot/NetworkCUPSPrinterShared.py \ |
| 166 |
troubleshoot/PrinterStateReasons.py \ |
| 167 |
troubleshoot/PrintTestPage.py \ |
| 168 |
troubleshoot/QueueNotEnabled.py \ |
| 169 |
troubleshoot/QueueRejectingJobs.py \ |
| 170 |
troubleshoot/RemoteAddress.py \ |
| 171 |
troubleshoot/SchedulerNotRunning.py \ |
| 172 |
troubleshoot/ServerFirewalled.py \ |
| 173 |
troubleshoot/Shrug.py \ |
| 174 |
troubleshoot/VerifyPackages.py \ |
| 175 |
troubleshoot/Welcome.py \ |
| 176 |
xml/preferreddrivers.rng \ |
| 177 |
xml/validate.py |
| 178 |
|
| 179 |
cupshelpersdir=$(sysconfdir)/cupshelpers |
| 180 |
cupshelpers_DATA=\ |
| 181 |
xml/preferreddrivers.xml |
| 182 |
|
| 183 |
nodist_bin_SCRIPTS= \ |
| 184 |
system-config-printer \ |
| 185 |
install-printerdriver \ |
| 186 |
system-config-printer-applet \ |
| 187 |
dbus/scp-dbus-service |
| 188 |
|
| 189 |
if UDEV_RULES |
| 190 |
udevrules_DATA=udev/70-printers.rules |
| 191 |
udev_udev_configure_printer_SOURCES=\ |
| 192 |
udev/udev-configure-printer.c |
| 193 |
udev_udev_configure_printer_LDADD= -lcups -ludev $(libusb_LIBS) $(GLIB_LIBS) |
| 194 |
udev_udev_configure_printer_CFLAGS= $(AM_CFLAGS) $(libusb_CFLAGS) $(GLIB_CFLAGS) |
| 195 |
udev_PROGRAMS=\ |
| 196 |
udev/udev-configure-printer |
| 197 |
udev_SCRIPTS=\ |
| 198 |
udev/udev-add-printer |
| 199 |
|
| 200 |
if HAVE_SYSTEMD |
| 201 |
systemdsystemunit_DATA = \ |
| 202 |
udev/[email protected] |
| 203 |
systemd_CLEANFILES = \ |
| 204 |
$(systemdsystemunit_DATA) |
| 205 |
else |
| 206 |
systemd_CLEANFILES= |
| 207 |
endif |
| 208 |
|
| 209 |
else |
| 210 |
systemd_CLEANFILES= |
| 211 |
endif |
| 212 |
|
| 213 |
if XMLTO |
| 214 |
man_MANS= \ |
| 215 |
man/system-config-printer.1 \ |
| 216 |
man/system-config-printer-applet.1 |
| 217 |
endif |
| 218 |
|
| 219 |
dbus_DATA = \ |
| 220 |
dbus/com.redhat.NewPrinterNotification.conf \ |
| 221 |
dbus/com.redhat.PrinterDriversInstaller.conf |
| 222 |
dbusdir = $(sysconfdir)/dbus-1/system.d/ |
| 223 |
|
| 224 |
dbusinterfaces_DATA = \ |
| 225 |
dbus/org.fedoraproject.Config.Printing.xml |
| 226 |
dbusinterfacesdir = $(datadir)/dbus-1/interfaces/ |
| 227 |
|
| 228 |
nodist_dbusservices_DATA = \ |
| 229 |
dbus/org.fedoraproject.Config.Printing.service |
| 230 |
dbusservicesdir = $(datadir)/dbus-1/services/ |
| 231 |
|
| 232 |
desktop_DATA =\ |
| 233 |
system-config-printer.desktop \ |
| 234 |
print-applet.desktop |
| 235 |
desktopdir = $(datadir)/applications/ |
| 236 |
autostartdir = $(sysconfdir)/xdg/autostart/ |
| 237 |
|
| 238 |
system-config-printer.desktop: system-config-printer.desktop.in |
| 239 |
$(AM_V_GEN)$(MSGFMT) --desktop --keyword=Name --keyword=GenericName --keyword=Comment --keyword=X-GNOME-FullName --template $< -d $(top_srcdir)/po -o $@ |
| 240 |
|
| 241 |
print-applet.desktop: print-applet.desktop.in |
| 242 |
$(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ |
| 243 |
|
| 244 |
DESKTOP_VENDOR=@DESKTOPVENDOR@ |
| 245 |
DESKTOP_PREFIX=@DESKTOPPREFIX@ |
| 246 |
|
| 247 |
install-desktopDATA: $(desktop_DATA) |
| 248 |
mkdir -p $(DESTDIR)$(desktopdir) |
| 249 |
mkdir -p $(DESTDIR)$(desktopdir) |
| 250 |
desktop-file-install $(DESKTOP_VENDOR) \ |
| 251 |
--dir $(DESTDIR)$(desktopdir) \ |
| 252 |
--add-category System \ |
| 253 |
--add-category Settings \ |
| 254 |
--add-category HardwareSettings \ |
| 255 |
--add-category Printing \ |
| 256 |
--add-category GTK \ |
| 257 |
system-config-printer.desktop |
| 258 |
desktop-file-install $(DESKTOP_VENDOR) \ |
| 259 |
--dir $(DESTDIR)$(autostartdir) \ |
| 260 |
--add-category System \ |
| 261 |
--add-category Monitor \ |
| 262 |
--add-category GTK \ |
| 263 |
print-applet.desktop |
| 264 |
|
| 265 |
uninstall-desktopDATA: |
| 266 |
rm -f $(DESTDIR)$(desktopdir)/$(DESKTOP_PREFIX)system-config-printer.desktop |
| 267 |
rm -f $(DESTDIR)$(autostartdir)/$(DESKTOP_PREFIX)print-applet.desktop |
| 268 |
|
| 269 |
desktop_in_files = $(desktop_DATA:.desktop=.desktop.in) |
| 270 |
|
| 271 |
appdatadir = $(datadir)/metainfo |
| 272 |
appdata_in_files = system-config-printer.appdata.xml.in |
| 273 |
appdata_DATA = $(appdata_in_files:.xml.in=.xml) |
| 274 |
|
| 275 |
system-config-printer.appdata.xml: system-config-printer.appdata.xml.in |
| 276 |
$(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ |
| 277 |
|
| 278 |
EXTRA_DIST=\ |
| 279 |
$(nobase_pkgdata_SCRIPTS) \ |
| 280 |
$(nobase_pkgdata_DATA) \ |
| 281 |
$(nobase_sbin_SCRIPTS) \ |
| 282 |
$(bin_SCRIPTS) \ |
| 283 |
setup.py \ |
| 284 |
$(EXPORT_MODULES) \ |
| 285 |
$(dbus_DATA) \ |
| 286 |
$(dbusinterfaces_DATA) \ |
| 287 |
$(dbusservices_DATA) \ |
| 288 |
bootstrap \ |
| 289 |
mkinstalldirs \ |
| 290 |
ChangeLog-OLD \ |
| 291 |
README \ |
| 292 |
$(desktop_in_files) \ |
| 293 |
config.py.in \ |
| 294 |
cupshelpers/config.py.in \ |
| 295 |
profile-ppds.py \ |
| 296 |
udev/udev-add-printer \ |
| 297 |
udev/70-printers.rules \ |
| 298 |
udev/[email protected] \ |
| 299 |
dbus/org.fedoraproject.Config.Printing.service.in \ |
| 300 |
xml/preferreddrivers.xml \ |
| 301 |
test_PhysicalDevice.py \ |
| 302 |
$(appdata_in_files) |
| 303 |
|
| 304 |
if XMLTO |
| 305 |
EXTRA_DIST+=man/system-config-printer.xml |
| 306 |
|
| 307 |
# The man pages are generated from DocBook XML. |
| 308 |
.stamp-man-pages-built: $(top_srcdir)/man/system-config-printer.xml |
| 309 |
xmlto man -o man $< |
| 310 |
touch .stamp-man-pages-built |
| 311 |
|
| 312 |
$(man_MANS): .stamp-man-pages-built |
| 313 |
endif |
| 314 |
|
| 315 |
html: $(EXPORT_MODULES) $(EXPORT_MODULES_GEN) |
| 316 |
rm -rf html |
| 317 |
epydoc -o html --html $(EXPORT_MODULES) |
| 318 |
|
| 319 |
distcheck-hook: update-po missing-imports |
| 320 |
|
| 321 |
update-po: missing-languages |
| 322 |
$(MAKE) -C po update-po |
| 323 |
|
| 324 |
missing-languages: |
| 325 |
bash -c '\ |
| 326 |
diff -u <(cat po/LINGUAS) \ |
| 327 |
<(cd po; ls -1 *.po | sed -e "s,\.po$$,,")' |
| 328 |
|
| 329 |
missing-imports: |
| 330 |
s=0; \ |
| 331 |
for a in $(top_srcdir)/*.py; do \ |
| 332 |
modules=$$(sed -ne 's,^.*except \([a-z]\+\)\..*$$,\1,p' \ |
| 333 |
"$$a" | sort -u); \ |
| 334 |
for module in $$modules; do \ |
| 335 |
if ! grep -q "import \(.*, *\)\?$$module" "$$a"; then \ |
| 336 |
echo "$$a should import $$module"; \ |
| 337 |
s=1; \ |
| 338 |
fi; \ |
| 339 |
done; \ |
| 340 |
done; \ |
| 341 |
exit $$s |
| 342 |
|
| 343 |
run: config.py cupshelpers/config.py |
| 344 |
SYSTEM_CONFIG_PRINTER_UI=$(top_srcdir)/ui \ |
| 345 |
CUPSHELPERS_XMLDIR=$(top_srcdir)/xml \ |
| 346 |
$(PYTHON) $(top_srcdir)/system-config-printer.py --debug |
| 347 |
|
| 348 |
run-applet: config.py cupshelpers/config.py |
| 349 |
$(PYTHON) $(top_srcdir)/applet.py --debug |
| 350 |
|
| 351 |
run-dbus-service: config.py cupshelpers/config.py |
| 352 |
SYSTEM_CONFIG_PRINTER_UI=$(top_srcdir)/ui \ |
| 353 |
CUPSHELPERS_XMLDIR=$(top_srcdir)/xml \ |
| 354 |
$(PYTHON) $(top_srcdir)/scp-dbus-service.py --debug |
| 355 |
|
| 356 |
test-xmldriverprefs: cupshelpers/xmldriverprefs.py xml/preferreddrivers.xml |
| 357 |
$(PYTHON) -c 'from cupshelpers.xmldriverprefs import test; test()' \ |
| 358 |
2>&1 | less |
| 359 |
|
| 360 |
help: |
| 361 |
@echo "Usage: make <target>" |
| 362 |
@echo "Available targets:" |
| 363 |
@echo " help Show this help message" |
| 364 |
@echo " update-po Update the translations" |
| 365 |
@echo " missing-languages Show which po files are not shipped" |
| 366 |
@echo " run Run system-config-printer with local UI files" |
| 367 |
@echo " run-applet Run system-config-printer-applet" |
| 368 |
@echo " run-dbus-service Run scp-dbus-service with local UI files" |
| 369 |
@echo " test-xmldriverprefs Show preferred driver order for all models" |
| 370 |
|
| 371 |
test-xml-validity.sh: FORCE |
| 372 |
echo "#!/bin/bash" > "$@" |
| 373 |
echo "set -e" >> "$@" |
| 374 |
echo "xmllint --relaxng \\" >> "$@" |
| 375 |
echo " $(top_srcdir)/xml/preferreddrivers.rng \\" >> "$@" |
| 376 |
echo " $(top_srcdir)/xml/preferreddrivers.xml >/dev/null" >> "$@" |
| 377 |
echo "$(PYTHON) $(top_srcdir)/xml/validate.py \\" >> "$@" |
| 378 |
echo " $(top_srcdir)/xml/preferreddrivers.xml" >> "$@" |
| 379 |
chmod 755 "$@" |
| 380 |
|
| 381 |
py.test.sh: FORCE |
| 382 |
echo "#!/bin/bash" > "$@" |
| 383 |
echo "exec ${PYTEST-py.test}" >> "$@" |
| 384 |
chmod 755 "$@" |
| 385 |
|
| 386 |
TESTS = test-xml-validity.sh py.test.sh |
| 387 |
|
| 388 |
CLEANFILES= \ |
| 389 |
$(systemd_CLEANFILES) \ |
| 390 |
$(desktop_DATA) \ |
| 391 |
$(appdata_DATA) |
| 392 |
|
| 393 |
DISTCLEANFILES=*.pyc *.pyo *~ *.bak \ |
| 394 |
troubleshoot/*.pyc troubleshoot/*.pyo troubleshoot/*~ \ |
| 395 |
*.desktop man/*.1 \ |
| 396 |
test-ppd-module.sh test-xml-validity.sh py.test.sh pickled-ppds \ |
| 397 |
config.py cupshelpers/config.py zanata.xml \ |
| 398 |
dbus/org.fedoraproject.Config.Printing.service |
| 399 |
|
| 400 |
distclean-local: |
| 401 |
rm -rf html |
| 402 |
rm -rf cupshelpers/__pycache__ |
| 403 |
rm -rf cupshelpers.egg-info/ |
| 404 |
rm -rf dist/cupshelpers*.egg |
| 405 |
|
| 406 |
.PHONY: update-po missing-languages run help FORCE |