1NAME = xattr
2VERSION = 0.6.4
3
4
5PYTHON3 := $(shell python -c 'import sys;print("YES" if sys.version_info[0] > 2 else "NO")')
6SETUPARGS = --install-scripts=/usr/bin
7
8include ../Makefile.inc
9
10custompatching:
11	ed - $(DIR)/xattr/__init__.py < xattr___init__.py.ed
12	ed - $(DIR)/xattr/_xattr.c < xattr__xattr.c.ed
13ifeq ($(PYTHON3),YES)
14	ed - $(DIR)/xattr/__init__.py < xattr___init__.py3.ed
15	! { unifdef -DPY3K -o $(DIR)/xattr/tool.py rtool.py.in || \
16	[ $$? -ne 1 ]; }
17	2to3 --no-diffs -w -n $(DIR)
18else
19	! { unifdef -UPY3K -o $(DIR)/xattr/tool.py rtool.py.in || \
20	[ $$? -ne 1 ]; }
21endif
22
23postinstall:
24	cp -f $(DIR)/LICENSE.txt $(OSL)/$(NAME)-$(VERSION).txt
25	cp -f $(NAME).partial $(OSV)/$(NAME)-$(VERSION).partial
26	mkdir -p $(DSTROOT)/usr/share/man/man1
27	cp -f $(NAME).1 $(DSTROOT)/usr/share/man/man1
28