[smuxi] lib/Makefile.am: filter .git directories from source tarball



commit b0476480b064c2d89a6a4f235e7ea16d8ed77994
Author: Mirco Bauer <meebey meebey net>
Date:   Sat Feb 13 00:12:48 2021 +0800

    lib/Makefile.am: filter .git directories from source tarball
    
    The `smuxi-1.1.tar.gz` tarballs contains a range of `.git` directories and files
    that shouldn't be there as this is a tarball based source distribution.
    
    This created a problem in Debian where `gbp import-orig smuxi-1.1.tar.gz` was
    missing the files underneath `lib/SmartIrc4net` as it contained a full blown
    git repo within the tarball.
    
    The "dist-hook" automake target is used to filter such things from the resulting
    source tarball that got included via the magic EXTRA_DIST variable.
    
    The following `.git` files and directories are now removed from the tarball:
    
        ./lib/SmartIrc4net/.git
        ./lib/SmartIrc4net/src/starksoftproxy/.git
        ./lib/StarkSoftProxy/.git
        ./lib/agsxmpp/agsxmpp/starksoftproxy/.git

 lib/Makefile.am | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ad62fc09..0c01a5d1 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -312,3 +312,11 @@ if BUNDLE_DB4O
 #      $(XBUILD) $(DB4O_NQ_XBUILD_FLAGS) /t:Clean $(DB4O_NQ_BUILD_FILE)
 endif
 
+# filter all .git files/directories from tarball
+dist-hook:
+       for GIT_DIR in $$(find $(distdir) -name ".git"); do \
+               echo "filtering $$GIT_DIR from tarball..."; \
+               chmod -R u+w $(distdir)/$$GIR_DIR; \
+               rm -rf $$GIT_DIR; \
+       done
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]