void-packages/lib/Makefile
Juan RP 0d8f08e8ea Added support to list and remove orphaned packages.
A new target has been added to xbps-bin: autoremove. It works in
the same way than 'apt-get', but there's no stdin input. By default
it will list you all orphaned packages, and -f flag must be set
to really remove them.

The following is a real example for the git package, which requires
directly perl and curl-libs, and indirectly libidn and openssl.

$ xbps-bin -r ~/testing-xbps remove git
Removing package git-1.6.1.3 ... done.
$

$ xbps-bin -r ~/testing-xbps autoremove
The following packages were installed automatically
(as dependencies) and aren't needed anymore:

	perl-5.10.0 curl-libs-7.19.0 libidn-1.10 openssl-0.9.8j

If you are really sure you don't need them, use -f to confirm.
$

--HG--
extra : convert_revision : 70eebaa3d99be27753b94f580c8ec86330c7c2d3
2009-03-02 02:26:20 +01:00

36 lines
824 B
Makefile

include ../vars.mk
# The shared library.
MAJOR = 0
MINOR = 0
MICRO = 0
LIBXBPS_SO = $(LIBXBPS).$(MAJOR).$(MINOR).$(MICRO)
LIBXBPS = libxbps.so
LIBXBPS_LDFLAGS = -larchive -lprop -shared -Wl,-soname,$(LIBXBPS).$(MAJOR)
OBJECTS = cmpver.o depends.o fexec.o humanize_number.o install.o
OBJECTS += orphans.o plist.o remove.o repository.o requiredby.o
OBJECTS += sha256.o sortdeps.o unpack.o util.o
all: $(LIBXBPS)
.PHONY: all
$(LIBXBPS): $(OBJECTS)
$(CC) $(LIBXBPS_LDFLAGS) $^ -o $(LIBXBPS_SO)
-ln -sf $(LIBXBPS_SO) $(LIBXBPS).$(MAJOR)
-ln -sf $(LIBXBPS_SO) $(LIBXBPS)
install: $(LIBXBPS)
install -d $(LIBDIR)
install -m 644 $(LIBXBPS_SO) $(LIBDIR)
cp -a $(LIBXBPS) $(LIBDIR)
cp -a $(LIBXBPS).$(MAJOR) $(LIBDIR)
.PHONY: clean
clean: clean-lib clean-objs
clean-lib:
-rm -f $(LIBXBPS)*
clean-objs:
-rm -f *.o