add flac package (thanks to David Collet)
[openwrt.git] / package / flac / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=flac
6 PKG_VERSION:=1.1.2
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=2bfc127cdda02834d0491ab531a20960
9
10 PKG_SOURCE_URL:=@SF/flac
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,LIBFLAC,libflac,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured:
22 touch $@
23
24 $(PKG_BUILD_DIR)/.built:
25 rm -rf $(PKG_INSTALL_DIR)
26 mkdir -p $(PKG_INSTALL_DIR)
27 $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.lite \
28 $(TARGET_CONFIGURE_OPTS) \
29 libFLAC
30 touch $@
31
32 $(IPKG_LIBFLAC):
33 install -m0755 -d $(IDIR_LIBFLAC)/usr/lib
34 cp -fpR $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(IDIR_LIBFLAC)/usr/lib/
35 $(RSTRIP) $(IDIR_LIBFLAC)
36 $(IPKG_BUILD) $(IDIR_LIBFLAC) $(PACKAGE_DIR)
37
38 $(STAGING_DIR)/usr/lib/libFLAC.so: $(PKG_BUILD_DIR)/.built
39 mkdir -p $(STAGING_DIR)/usr/include
40 cp -fpR $(PKG_BUILD_DIR)/include/FLAC $(STAGING_DIR)/usr/include/
41 mkdir -p $(STAGING_DIR)/usr/lib
42 cp -fpR $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.a $(STAGING_DIR)/usr/lib/
43 cp -fpR $(PKG_BUILD_DIR)/obj/release/lib/libFLAC.so $(STAGING_DIR)/usr/lib/
44 touch $@
45
46 install-dev: $(STAGING_DIR)/usr/lib/libFLAC.so
47
48 uninstall-dev:
49 rm -rf \
50 $(STAGING_DIR)/usr/include/FLAC \
51 $(STAGING_DIR)/usr/lib/libFLAC.a \
52 $(STAGING_DIR)/usr/lib/libFLAC.so \
53
54 compile: install-dev
55 clean: uninstall-dev
56
57 mostlyclean:
58 -$(MAKE) -C $(PKG_BUILD_DIR) clean
59 rm -f $(PKG_BUILD_DIR)/.built
60
This page took 0.051132 seconds and 5 git commands to generate.