1 VERSION
= $(shell echo
`awk '{ print $$1 }' version`)
2 RELEASE
= $(shell echo
`awk '{ print $$2 }' version`)
3 NEWRELEASE
= $(shell echo
$$(($(RELEASE
) + 1)))
5 MESSAGESPOT
=po
/messages.pot
8 DIRS
= certmaster docs scripts
9 PYDIRS
= certmaster scripts
11 INITDIR
= init-scripts
17 pod2man
--center
="certmaster-request" --release
="" .
/docs
/certmaster-inventory.pod | gzip
-c
> .
/docs
/certmaster-request
.1.gz
18 pod2man
--center
="certmaster" --release
="" .
/docs
/certmaster.pod | gzip
-c
> .
/docs
/certmaster
.1.gz
19 pod2man
--center
="certmaster-ca" --release
="" .
/docs
/certmaster-ca.pod | gzip
-c
> .
/docs
/certmaster-ca
.1.gz
21 messages
: certmaster
/*.py
23 xgettext
-k_
-kN_
-o
$(MESSAGESPOT
) certmaster
/*.py
24 sed
-i
'~' -e
's/SOME DESCRIPTIVE TITLE/certmaster/g' -e
's/YEAR THE PACKAGE'"'"'S COPYRIGHT HOLDER/2007 Red Hat, inc. /g' -e
's/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR/Adrian Likins <alikins@redhat.com>, 2007/g' -e
's/PACKAGE VERSION/certmaster $(VERSION)-$(RELEASE)/g' -e
's/PACKAGE/certmaster/g' $(MESSAGESPOT
)
28 -echo
"$(VERSION) $(NEWRELEASE)" > version
31 -echo
"$(VERSION) $(RELEASE)" > version
34 python setup.py build
-f
42 -for d in
$(DIRS
); do
($(MAKE
) -C
$$d clean ); done
45 -rm -rf
$(shell python
-c
"from distutils.sysconfig import get_python_lib; print get_python_lib()")/certmaster
48 -rm -rf
/etc
/pki
/certmaster
49 -rm -rf
/etc
/certmaster
50 -rm -rf
/var
/lib
/certmaster
52 clean_hardest
: clean_rpms
55 install: build manpage
56 python setup.py
install -f
58 install_hard
: clean_hard
install
60 install_harder
: clean_harder
install
62 install_hardest
: clean_harder clean_rpms rpms install_rpm restart
65 -rpm
-Uvh rpm-build
/certmaster-
$(VERSION
)-$(RELEASE
)$(shell rpm
-E
"%{?dist}").noarch.rpm
68 -/etc
/init.d
/certmaster restart
70 recombuild
: install_harder restart
78 new-rpms
: bumprelease rpms
81 -for d in
$(PYDIRS
); do
($(MAKE
) -C
$$d pychecker
); done
83 -for d in
$(PYDIRS
); do
($(MAKE
) -C
$$d pyflakes
); done
86 -sloccount
--addlang
"makefile" $(TOPDIR
) $(PYDIRS
) $(EXAMPLEDIR
) $(INITDIR
)
89 /sbin
/service certmaster restart
92 rpms
: build manpage sdist
94 cp
dist/*.gz rpm-build
/
96 rpmbuild
--define "_topdir %(pwd)/rpm-build" \
97 --define "_builddir %{_topdir}" \
98 --define "_rpmdir %{_topdir}" \
99 --define "_srcrpmdir %{_topdir}" \
100 --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
101 --define "_specdir %{_topdir}" \
102 --define "_sourcedir %{_topdir}" \