github.com/rigado/snapd@v2.42.5-go-mod+incompatible/data/dbus/Makefile (about)

     1  #
     2  # Copyright (C) 2017 Canonical Ltd
     3  #
     4  # This program is free software: you can redistribute it and/or modify
     5  # it under the terms of the GNU General Public License version 3 as
     6  # published by the Free Software Foundation.
     7  #
     8  # This program is distributed in the hope that it will be useful,
     9  # but WITHOUT ANY WARRANTY; without even the implied warranty of
    10  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    11  # GNU General Public License for more details.
    12  #
    13  # You should have received a copy of the GNU General Public License
    14  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    15  
    16  BINDIR := /usr/bin
    17  DBUSSERVICESDIR := /usr/share/dbus-1/services
    18  
    19  SERVICES_GENERATED := $(patsubst %.service.in,%.service,$(wildcard *.service.in))
    20  SERVICES := ${SERVICES_GENERATED}
    21  
    22  %.service: %.service.in
    23  	cat $< | sed 's:@bindir@:${BINDIR}:g' | cat > $@
    24  
    25  all: ${SERVICES}
    26  
    27  install: ${SERVICES}
    28  	# NOTE: old (e.g. 14.04) GNU coreutils doesn't -D with -t
    29  	install -d -m 0755 ${DESTDIR}/${DBUSSERVICESDIR}
    30  	install -m 0644 -t ${DESTDIR}/${DBUSSERVICESDIR} $^
    31  
    32  clean:
    33  	rm -f ${SERVICES_GENERATED}