From d269debdec054427b08755197e29eabbcf45d090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Sat, 22 Aug 2009 08:48:29 +0000 Subject: [PATCH] Add optional destDir parameter to pisitools.dohtml as pisitools.dodoc supports --- ChangeLog | 4 ++++ pisi/actionsapi/pisitools.py | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69678bcd..50a1a7cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-08-22 Fatih Aşıcı + * Add optional destDir parameter to pisitools.dohtml as + pisitools.dodoc supports. + 2009-08-04 Ozan Çağlayan * (pisi/util.py): Revert kernel module stripping for now as it's not tested well. diff --git a/pisi/actionsapi/pisitools.py b/pisi/actionsapi/pisitools.py index 3b40998d..f1497811 100644 --- a/pisi/actionsapi/pisitools.py +++ b/pisi/actionsapi/pisitools.py @@ -48,7 +48,7 @@ def dodir(destinationDirectory): def dodoc(*sourceFiles, **kw): '''inserts the files in the list of files into /usr/share/doc/PACKAGE''' destDir = kw.get("destDir", get.srcNAME()) - readable_insinto(join_path(get.installDIR(), join_path(get.docDIR(), destDir)), *sourceFiles) + readable_insinto(join_path(get.installDIR(), get.docDIR(), destDir), *sourceFiles) def doexe(sourceFile, destinationDirectory): '''insert a executable file into destination directory''' @@ -56,11 +56,12 @@ def doexe(sourceFile, destinationDirectory): ''' example call: pisitools.doexe("kde-3.4.sh", "/etc/X11/Sessions")''' executable_insinto(join_path(get.installDIR(), destinationDirectory), sourceFile) -def dohtml(*sourceFiles): +def dohtml(*sourceFiles, **kw): '''inserts the files in the list of files into /usr/share/doc/PACKAGE/html''' ''' example call: pisitools.dohtml("doc/doxygen/html/*")''' - destionationDirectory = join_path(get.installDIR(), 'usr/share/doc', get.srcNAME(), 'html') + destDir = kw.get("destDir", get.srcNAME()) + destionationDirectory = join_path(get.installDIR(), get.docDIR(), destDir, 'html') if not can_access_directory(destionationDirectory): makedirs(destionationDirectory)