forked from fumiyas/smbldap-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
132 lines (104 loc) · 4.77 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# $Id$
SOURCE_DIR= .
SOURCE_BUILD= $(SOURCE_DIR)/build
## ======================================================================
RELEASE= 1
DESTARCH= smbldap-tools-$(PACKAGE_VERSION)
# where to build the rpm
TOPDIR= $$HOME/redhat
GPG_PATH= $$HOME/.gnupg
RPMBUILD_COMMAND= rpmbuild -ba --sign
BUILD_TARGETS= \
$(BUILD_PERL_MOD_TARGETS) \
$(BUILD_PERL_CMD_TARGETS) \
$(BUILD_PERL_MAN_TARGETS) \
smbldap-upgrade-0.9.6.cmd \
doc/smb.conf.example \
doc/smb.smbldap.conf.example \
#
INSTALL_DIR= $(PERL_LIBDIR)
INSTALL_FILES= $(BUILD_PERL_MOD_TARGETS)
INSTALL_CMD_DIR= $(sbindir)
INSTALL_CMDS= $(BUILD_PERL_CMD_TARGETS)
PERL_MOD_SOURCES= smbldap_tools.pl
PERL_CMD_SOURCES= \
smbldap-groupadd.pl \
smbldap-groupdel.pl \
smbldap-grouplist.pl \
smbldap-groupmod.pl \
smbldap-groupshow.pl \
smbldap-passwd.pl \
smbldap-populate.pl \
smbldap-useradd.pl \
smbldap-userdel.pl \
smbldap-userinfo.pl \
smbldap-userlist.pl \
smbldap-usermod.pl \
smbldap-usershow.pl \
smbldap-config.pl \
#
PERL_MAN_SECTION= 8
BUILD_PERL_MOD_TARGETS= $(PERL_MOD_SOURCES:.pl=.pm)
BUILD_PERL_CMD_TARGETS= $(PERL_CMD_SOURCES:.pl=.cmd)
BUILD_PERL_MAN_TARGETS= $(BUILD_PERL_CMD_TARGETS:.cmd=.$(PERL_MAN_SECTION))
## ======================================================================
include $(SOURCE_BUILD)/Makefile.common
include $(SOURCE_BUILD)/Makefile.top
## ======================================================================
.SUFFIXES: .cmd .$(PERL_MAN_SECTION)
.cmd.$(PERL_MAN_SECTION):
@echo "Building $@ from $< ..."
@$(POD2MAN_COMMAND) --section=$(PERL_MAN_SECTION) $< >[email protected]
@mv [email protected] $@
## ======================================================================
all: build
build::
install:: install-files install-cmds
## ======================================================================
build_dir:
@echo '%_topdir $(TOPDIR)' > $(HOME)/.rpmmacros
@echo '%_signature gpg' >> $(HOME)/.rpmmacros
@echo '%_gpg_name Jerome Tournier <[email protected]>' >> $(HOME)/.rpmmacros
@echo '%_gpg_path $(GPG_PATH)' >> $(HOME)/.rpmmacros
@mkdir -p $(TOPDIR)/BUILD
@mkdir -p $(TOPDIR)/RPMS/i386
@mkdir -p $(TOPDIR)/SOURCES
@mkdir -p $(TOPDIR)/SPECS
@mkdir -p $(TOPDIR)/SRPMS
rpm: dist build_dir
@cp -f $(DESTARCH).tgz $(TOPDIR)/SOURCES/
@cp -f smbldap-tools.spec $(TOPDIR)/SPECS/
@perl -i -pe's@^\%define version(.*)@\%define version $(VERSION)@' $(TOPDIR)/SPECS/smbldap-tools.spec
@perl -i -pe's@^\%define release(.*)@\%define release $(RELEASE)@' $(TOPDIR)/SPECS/smbldap-tools.spec
@perl -i -pe's@^Source0(.*)@Source0: smbldap-tools-$(VERSION).tgz@' $(TOPDIR)/SPECS/smbldap-tools.spec
@cd $(TOPDIR)/SPECS/ && $(RPMBUILD_COMMAND) smbldap-tools.spec
@echo "Signing packages smbldap-tools-$(VERSION)-$(RELEASE).noarch.rpm"
@cd $(TOPDIR)/RPMS/noarch && gpg --detach smbldap-tools-$(VERSION)-$(RELEASE).noarch.rpm
@echo "Signing packages smbldap-tools-$(VERSION)-$(RELEASE).src.rpm"
@cd $(TOPDIR)/SRPMS/ && gpg --detach smbldap-tools-$(VERSION)-$(RELEASE).src.rpm
@echo "Signing packages smbldap-tools-$(VERSION).tgz"
@cd $(TOPDIR)/SOURCES/ && gpg --detach smbldap-tools-$(VERSION).tgz
@echo "Arch: $(DESTARCH).tgz"
home_devel: rpm
@mkdir -p iallanis/{docs/{smbldap-tools,samba-ldap-howto},old,development_release}
@cp -f iallanis/development_release/ChangeLog "/tmp/ChangeLog-homedevel-`date`"
@cp -f ChangeLog iallanis/development_release/
@cp $(TOPDIR)/SOURCES/smbldap-tools-$(VERSION){.tgz,.tgz.sig} iallanis/development_release/
@cp $(TOPDIR)/RPMS/noarch/smbldap-tools-$(VERSION)-$(RELEASE).noarch{.rpm,.rpm.sig} iallanis/development_release/
@cp $(TOPDIR)/SRPMS/smbldap-tools-$(VERSION)-$(RELEASE).src{.rpm,.rpm.sig} iallanis/development_release/
@rsync -avz --delete --delete-excluded --exclude .svn -e "ssh -p 443" iallanis/ 192.168.10.1:/home/www/html/smbldap-tools
home: rpm
@cp -f iallanis/ChangeLog "/tmp/ChangeLog-home-`date`"
@cp -f ChangeLog iallanis/
@cp doc/smbldap-tools/smbldap-tools.html iallanis/docs/smbldap-tools/index.html
@cp doc/samba-ldap-howto/smbldap-howto.html iallanis/docs/samba-ldap-howto/index.html
@cp $(TOPDIR)/SOURCES/smbldap-tools-$(VERSION){.tgz,.tgz.sig} iallanis/
@cp $(TOPDIR)/RPMS/noarch/smbldap-tools-$(VERSION)-$(RELEASE).noarch{.rpm,.rpm.sig} iallanis/
@cp $(TOPDIR)/SRPMS/smbldap-tools-$(VERSION)-$(RELEASE).src{.rpm,.rpm.sig} iallanis/
rsync -avz --delete --delete-excluded --exclude .svn -e "ssh -p 443" iallanis/ 192.168.10.1:/home/www/html/smbldap-tools
gna:
@cp -f ChangeLog GNA/packages/
@cp $(TOPDIR)/SOURCES/smbldap-tools-$(VERSION){.tgz,.tgz.sig} GNA/packages/
@cp $(TOPDIR)/RPMS/noarch/smbldap-tools-$(VERSION)-$(RELEASE).noarch{.rpm,.rpm.sig} GNA/packages/
@cp $(TOPDIR)/SRPMS/smbldap-tools-$(VERSION)-$(RELEASE).src{.rpm,.rpm.sig} GNA/packages/
rsync -avz -e ssh --delete --delete-excluded --exclude .svn GNA/ download.gna.org:/upload/smbldap-tools/