All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
However, if you insist on concealing your identity, then you should not attribute the book to a specific person. Scholars, like Shaykh Bakr Abu Zayd underlined that such an act is impermissible for it is considered a lie. You may publish your book without mentioning the author’s name or use a broad title like 'an anonymous donor' or 'a devoted lover of Islam' or the like.
As for the library, if you are only going to name it after your uncle, then there is no harm in that. However, you should not proclaim that he is the donor of the library unless you dedicate the rewards of that righteous deed to him. In this case, it is allowable for you to proclaim that he is the donor.
Allaah Knows best.