1 | # |
---|
2 | # $Id: lvm.rul 522 2012-07-17 08:11:04Z dennis $ |
---|
3 | # vi: set filetype=make: |
---|
4 | # |
---|
5 | # 2007-02-10 Bernard Li |
---|
6 | # - LVM 2.2.02.18 provides --with-dmdir in ./configure script |
---|
7 | # 2005-01-12 Andrea Righi |
---|
8 | # - provided patch for lvm support |
---|
9 | # 2005.07.12 Brian Elliott Finley; patch from Erich Focht |
---|
10 | # - updates devmapper to 1.01.02 |
---|
11 | # - creates the symbolic link libdevmapper.so.1.01 which is required when |
---|
12 | # running mklibs (for tmp/boel_binaries/lib*). Without this patch the build |
---|
13 | # fails except one builds on a system where libdevmapper of the same version |
---|
14 | # is installed. But this is not why we build devmapper, after all... |
---|
15 | # |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | LVM_VERSION = 2.2.02.96 |
---|
20 | LVM_TARBALL = LVM$(LVM_VERSION).tgz |
---|
21 | LVM_DIR = $(SRC_DIR)/LVM$(LVM_VERSION) |
---|
22 | |
---|
23 | #### ftp://sources.redhat.com/pub/lvm2/ #### |
---|
24 | LVM_URL = ftp://ftp.sara.nl/pub/sali/sources/$(LVM_TARBALL) |
---|
25 | LVM_INFO = http://sources.redhat.com/lvm2/ |
---|
26 | |
---|
27 | .PHONY: lvm |
---|
28 | lvm: $(LVM_DIR).build |
---|
29 | |
---|
30 | .PHONY: lvm_install |
---|
31 | lvm_install: $(LVM_DIR).install |
---|
32 | |
---|
33 | .PHONY: lvm_clean |
---|
34 | lvm_clean: $(LVM_DIR).clean |
---|
35 | |
---|
36 | # By default, `make install' will install all the files in |
---|
37 | # `/usr/bin', `/usr/lib' etc. You can specify |
---|
38 | # an installation prefix other than `/usr' using `--prefix', |
---|
39 | # for instance `--prefix=$HOME'. |
---|
40 | $(LVM_DIR).build: $(LVM_DIR).get $(UDEV_DIR).build |
---|
41 | cd $(LVM_DIR) && \ |
---|
42 | CFLAGS="-I$(INITRD_BUILD_DIR)/usr/include -L$(INITRD_BUILD_DIR)/lib -ludev" \ |
---|
43 | UDEV_CFLAGS="-I$(INITRD_BUILD_DIR)/usr/include" \ |
---|
44 | UDEV_LIBS="-L$(INITRD_BUILD_DIR)/lib -ludev" \ |
---|
45 | ./configure --enable-udev_sync --enable-udev_rules |
---|
46 | cd $(LVM_DIR) && $(MAKE) -j $(NCPUS) |
---|
47 | |
---|
48 | touch $@ |
---|
49 | |
---|
50 | $(LVM_DIR).install: $(LVM_DIR).build |
---|
51 | cd $(LVM_DIR) && $(MAKE) DESTDIR=$(INITRD_BUILD_DIR) install |
---|
52 | touch $@ |
---|
53 | |
---|
54 | $(LVM_DIR).get: |
---|
55 | $(GETSOURCE) $(LVM_URL) $(SRC_DIR) |
---|
56 | cd $(SRC_DIR) && tar -xvzf $(LVM_TARBALL) |
---|
57 | touch $@ |
---|
58 | |
---|
59 | $(LVM_DIR).clean: initrd_clean |
---|
60 | rm -rf $(LVM_DIR)* |
---|