Skip to content

Commit

Permalink
Added Makefile, debian package and some explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Mar 3, 2020
1 parent b9c6ae0 commit 1c5b774
Show file tree
Hide file tree
Showing 12 changed files with 482 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/make
prefix=/usr/local

all:

install:
install -D kicad-git-filters.py $(DESTDIR)$(prefix)/bin/kicad-git-filters.py

clean:

distclean: clean

uninstall:
-rm -f $(DESTDIR)$(prefix)/bin/kicad-git-filters.py

deb:
fakeroot dpkg-buildpackage -uc -b

debclean:
fakeroot debian/rules clean


.PHONY: all install clean distclean uninstall deb

48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,48 @@
# kicad-git-filters
Scripts to make KiCad files more git friendly
Scripts to make KiCad files more git friendly.

One problem with some KiCad files is that they contain time stamps inside.
It means that every time you generate one of these files you'll get changes,
even when the important content didn't change. This could be very annoying
when using revision tools like *git*.

This isn't really needed if you can trust the time stamp of the files.
When using *git* you can easily find the exact time stamp for a commit.
This is not the same as the time when the file was actually created, but
is quite similar. In projects where this difference is tolerable and
you don't want to commit tons of ridiculous changes you can filter
these time stamps.

This script configures *git* to store the files with a marker instead of
the time stamp. When you check-out the project the markers are replaced
by the actual time stamp. If you need to know the real time stamp you must
consult it using *git*. Note that files that you created mantain the
original time stamp.

# Installation

## Dependencies

This is a Python 3.x script, only standard modules are used.

##

To install the script run (as root):

```
# make install
```

The scripts will be copied to */usr/local/bin*. If you want to install the scripts in */usr/bin* run


```
# make prefix=/usr install
```

Note: if you are using Debian, or some derived distro like Ubuntu, you can find a Debian package in the releases section.

# Credits and notes

* This script is strongly based on Jesse Vincent [work](https://github.com/obra/kicad-tools).
* I'm not a Python programmer, stackoverflow helps me ...
5 changes: 5 additions & 0 deletions debian/README.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kicad-git-filters for Debian

This is a simple package for the KiCad Git Filters tool.

-- Salvador Eduardo Tropea <salvador@inti.gob.ar> Tue, 03 Mar 2020 07:17:31 -0300
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kicad-git-filters (1.0.0-1) unstable; urgency=low

* Initial release.

-- Salvador Eduardo Tropea <salvador@inti.gob.ar> Tue, 03 Mar 2020 07:17:31 -0300
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11
18 changes: 18 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Source: kicad-git-filters
Section: electronics
Priority: optional
Maintainer: Salvador Eduardo Tropea <salvador@inti.gob.ar>
Build-Depends: debhelper (>=11~), dh-python, python3-all
Standards-Version: 4.1.4
Homepage: https://github.com/INTI-CMNB/kicad-git-filters
X-Python3-Version: >= 3.2

Package: kicad-git-filters
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}, ${python3:Depends}, git
Description: KiCad Git Filters
This package provides a tool to configure git repos so you
don't get tons of useless changes on files generated by
KiCad that contain the time stamp inside.

366 changes: 366 additions & 0 deletions debian/copyright

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
8 changes: 8 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/make -f

%:
dh $@ --with python3

override_dh_auto_install:
dh_auto_install -- prefix=/usr

1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
3 changes: 3 additions & 0 deletions debian/source/local-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Uncomment to active options. See dpkg-source(1)
#abort-on-upstream-changes
#unapply-patches
3 changes: 3 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version=3
https://github.com/INTI-CMNB/kicad-git-filters/tags .*/(\d[\d\.]*)\.(?:tar.gz|tar.bz2|tar.xz)

0 comments on commit 1c5b774

Please sign in to comment.