vim: update to 9.1.0984
[oi-userland.git] / components / library / xdg-user-dirs / Makefile
blob3be0da6c515b618043809975f819c74531bb529f
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL)". You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright (c) 2015 Alexander Pyhalov
14 BUILD_BITS= 64
15 include ../../../make-rules/shared-macros.mk
17 COMPONENT_NAME= xdg-user-dirs
18 COMPONENT_VERSION= 0.18
19 COMPONENT_PROJECT_URL= https://freedesktop.org/wiki/
20 COMPONENT_SUMMARY= Tool to help manage user directories
21 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
22 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
23 COMPONENT_ARCHIVE_HASH= sha256:ec6f06d7495cdba37a732039f9b5e1578bcb296576fde0da40edb2f52220df3c
24 COMPONENT_ARCHIVE_URL= https://user-dirs.freedesktop.org/releases/$(COMPONENT_ARCHIVE)
25 COMPONENT_CLASSIFICATION= Applications/System Utilities
26 COMPONENT_LICENSE= GPLv2
27 COMPONENT_LICENSE_FILE= COPYING
28 COMPONENT_FMRI= library/xdg/xdg-user-dirs
30 TEST_TARGET= $(NO_TESTS)
31 include $(WS_MAKE_RULES)/common.mk
33 PATH=$(PATH.gnu)
35 COMPONENT_PREP_ACTION = ( cd $(@D) && autoreconf -f -i )
37 COMPONENT_PRE_CONFIGURE_ACTION = ( cp -rp $(SOURCE_DIR)/* $(@D) && \
38 cp -r $(COMPONENT_DIR)/files/po-sun $(@D) && \
39 cd $(@D)/po-sun && $(MAKE) all )
41 LDFLAGS += -lglib-2.0
43 CONFIGURE_OPTIONS+= --sysconfdir=/etc
45 # common targets
46 install: $(INSTALL_64)
47 $(GSED) -i -e 's:TEMPLATES=Templates:TEMPLATES=Documents/Templates:' \
48 -e 's:MUSIC=Music:MUSIC=Documents/Music:' \
49 -e 's:PICTURES=Pictures:PICTURES=Documents/Pictures:' \
50 -e 's:VIDEOS=Videos:VIDEOS=Documents/Videos:' $(PROTO_DIR)/etc/xdg/user-dirs.defaults
51 /usr/bin/grep '^\#' $(PROTO_DIR)/etc/xdg/user-dirs.defaults > $(PROTO_DIR)/etc/xdg/user-dirs.defaults.tmp
52 /usr/bin/grep -v "^#" $(PROTO_DIR)/etc/xdg/user-dirs.defaults | $(ENV) LC_ALL=C /usr/bin/sort -r -t = -k 2 >> $(PROTO_DIR)/etc/xdg/user-dirs.defaults.tmp
53 $(MV) $(PROTO_DIR)/etc/xdg/user-dirs.defaults.tmp $(PROTO_DIR)/etc/xdg/user-dirs.defaults
54 $(GSED) -i -e "s/^filename_encoding=UTF-8/filename_encoding=locale/" $(PROTO_DIR)/etc/xdg/user-dirs.conf
56 # Auto-generated dependencies
57 REQUIRED_PACKAGES += library/glib2
58 REQUIRED_PACKAGES += shell/bash
59 REQUIRED_PACKAGES += system/library